Sorry, this is a small problem. I want to learn more about how to use php to retrieve xml node data. & lt; type & gt ;=express, & lt; dests & gt; = the value of & lt; price & gt; at 530000, the eldest brother wrote a detailed code? The data code is as follows: & lt ;? Xml: a small question about helping php obtain xml node data
I want to obtain = Express, = 530000 The eldest brother wrote a detailed code?
The data code is as follows:
8.0
22.0
3.0
8.0
Express delivery
41864647
440000
181030917
3.0
10.0
EMS
130000,360000, 500000,460000, 370000,530000, 520000,340000, 50000,420000, 450000,410000, 110000,120000, 430000,350000
181030918
5.0
15.0
Express
------ Solution --------------------
The page does not display = 530000 labels .. The following is only the output structure. You can obtain the result by traversing and judging it ..
PHP code
$ Xml = <
8.0
22.0
3.0
8.0
Express delivery
41864647
440000
181030917
3.0
10.0
EMS
130000,360000, 500000,460000, 370000,530000, 520000,340000, 50000,420000, 450000,410000, 110000,120000, 430000,350000
181030918
5.0
15.0
Express
Xml; $ con = simplexml_load_string ($ xml); print_r ($ con );