I have written an xml-parser to read an XML-file. The XML-file is not mine so I can't change the structure. Things work great till I got to this special point. I want to read a value but I don't have a key to access this value. I marked the values (in red) in the screenshot below which I want to access.
When I dump the parent element (the PRAT->VALUE) I get this in return:
object(SimpleXMLElement)#31 (3) { ["@attributes"]=> array(5) { ["nr"]=> string(1) "1" ["unit"]=> string(3) "bar" ["unit_id"]=> string(4) "3103" ["vo"]=> string(0) "" ["vo_id"]=> string(0) "" } [0]=> string(2) "20" [1]=> string(1) "2" }
As seen, at the end of the dump the values that I want to access are presented. I tried to access it like an array but that doesn't work. The values are not part of the attributes.