php - How to get a specific array value from an XML File? -


I have written an XML-parser to read an XML-file XML-file is not mine, so I change the structure not can. Unless I am not getting to this particular point, the work is very good. I want to read one value but I do not have any key to access this value. I have the values ​​(red) in the screenshot below Is marked, which I want to access.

Enter image description here

I dump PRAT-> VALUE ), then in return I get:

  Object (simple explanation) # 31 (3) {["@attributes"] = & Gt; Array (5) {["nr"] = & gt; String (1) "1" ["unit"] = & gt; String (3) "bar" ["unit_id"] = & gt; String (4) "3103" ["vo"] = & gt; String (0) "" ["vo_id"] = & gt; String (0) ""} [0] = & gt; String (2) "20" [1] = & gt; String (1) "2"} As seen, the values ​​I want to reach at the end of the dump are presented. I tried to use it as an array, but that does not work, value is not part of  attributes .   

Use (string) keyword in front of it

For example.

  resonance (string) PRAT-> VALUE;  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -