Beg you for a question about how to help php obtain xml node data

Source: Internet
Author: User
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 );
      

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.