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.
});
}); |
0 replies
|
Sorry, somehow I missed whole 6th chapter in wiki. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
For example when using "each" now:
What would be nice is using $elem as FluidXml inside "each" callback
All reactions