arsd.dom getElementsByTagNameChildrenOnly?

Nicholas Wilson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 23 03:10:17 PST 2016


So the vulkan spec has a lot of stuff like
<types>
<type category="struct" name="VkBufferCreateInfo">
             <member><type>VkStructureType</type>        
<name>sType</name></member>                          <!-- Must be 
VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO -->
             <member>const <type>void</type>*            
<name>pNext</name></member>                          <!-- Pointer 
to next structure. -->
             <member 
optional="true"><type>VkBufferCreateFlags</type>    
<name>flags</name></member>                          <!-- Buffer 
creation flags -->
             <member><type>VkDeviceSize</type>           
<name>size</name></member>                           <!-- 
Specified in bytes -->
             <member><type>VkBufferUsageFlags</type>     
<name>usage</name></member>                          <!-- Buffer 
usage flags -->
             <member><type>VkSharingMode</type>          
<name>sharingMode</name></member>
             <member optional="true"><type>uint32_t</type>         
       <name>queueFamilyIndexCount</name></member>
             <member noautovalidity="true" 
len="queueFamilyIndexCount">const <type>uint32_t</type>*        
<name>pQueueFamilyIndices</name></member>
...
</ type>
...
</types>
How do I iterate over the child level elements only (ignoring the 
ones like <type>VkStructureType</type>)?
Do i have to check their parentage each time or is there an 
easier way?



More information about the Digitalmars-d-learn mailing list