Reputation: 673
This should be rather a simple task, but for some reasons a part of my xml file hasn't been read properly...
This is the XML Section in question:
<MTX>
...
<MoClass code=".0" modi="XYZ">
.....
</MoClass>
......
</MTX>
Now, i want to fetch the Node by following code:
$xml = simplexml_load_file(filename)
//this fails due to invalid predicate...
$xml->xPath('//MoClass[@code=".0" AND @modi="XYZ"]');
//but when i reverse the sequence of attributes
$xml->xPath('//MoClass[@modi="XYZ" AND @code=".0"]');
//then it works as expected and the node may be processed further...
What is the difference? Thanks in advance
Upvotes: 1
Views: 56