Replies: 2 comments
-
Checkout Iterating And Filtering. $elems = $xml->query('/Root/Elements/Element');
$elems->each(function($i, $node){
// $this is current iterated element as FluidXml instance.
$this->query('./SomeElementValue');
$this->query('../@SomeParentAttribute');
$this->query('./SubElement/AnotherValue');
// or even
$this->query('./SubElements')->each(function($i, $subElem){
// $this is still FluidXml.
});
}); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry, somehow I missed whole 6th chapter in wiki. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example when using "each" now:
What would be nice is using $elem as FluidXml inside "each" callback
Beta Was this translation helpful? Give feedback.
All reactions