Use PHP5.0 to easily parse XML documents (6)

Source: Internet
Author: User
The following describes how to use the createNode () function to add a product and then display the added result? Xmlversionquot; 1.0 quot; encodingquot; GB2. .. The following describes how to add a product using the createNode () function, and then displays the added result.

 
 
  
   
Hualian
  Changan Street, Beijing-9999
  
   
Supermarket chains
  
  
   
123456789
  
    
      
    
     
Food11
       
    
     
12.90
       
    
     
This item is good
      
     
      
    
     
New food12
       
    
     
22.10
      
     
      
    
     
Food13
       
    
     
100
      
   
  
    
      
    
     
Tel21
       
    
     
1290
      
   
  
    
      
    
     
Coat31
       
    
     
112
      
     
      
    
     
Coat32
       
    
     
45
      
   
  
    
      
    
     
Hot41
       
    
     
99
      
   
  
 The removeNode () function is used to delete a product and the deleted result is displayed.
 
 
  
   
Hualian
  Changan Street, Beijing-9999
  
   
Supermarket chains
  
  
   
123456789
  
    
      
    
     
Food11
       
    
     
12.90
       
    
     
This item is good
      
     
      
    
     
Food13
       
    
     
100
      
   
  
    
      
    
     
Tel21
       
    
     
1290
      
   
  
    
      
    
     
Coat31
       
    
     
112
      
     
      
    
     
Coat32
       
    
     
45
      
   
  
    
      
    
     
Hot41
       
    
     
99
      
   
  
 


Address:

Reprinted at will, but please attach the article address :-)

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.