I'm uploading and xml file using a php class I wrote. What I need is I need to check if ReadingDate exists in the xml or not.
<ProductCollect ReadingDate="2013-09-12T11:39:57.763">
I can get ProductCollect but how to access ReadingDate?
To get an attribute with XPath
/ProductCollect/@ReadingDate
/ProductCollect/@ReadingDate/@Test wouldn't make sense: XPath is looking at the hierarchy, not the sequence. Test and ReadingDate are both at the same level of the hierarchy, one is not a child of the other; which order they appear in is irrelevant.