in reply to XML Twig parse
Instead of using $root->children just use $root->children( 'ds') which will give you only the ds children, in the document order.
All navigation methods (children, first_child, next_sibling, descendants...) accept an extra argument, a condition used to filter results. See the module doc (which I admit is pretty huge and hard to navigate) for more info.
|
|---|