XML package import and processing XML data format | R package

Source: Internet
Author: User
The R language provides an XML package for parsing XML data formats, including importing XML data and processing XML data. examples are as follows.

What is XML?

• XML refers to the EXtensible Markup Language)
• XML is a markup language, similar to HTML
• XML is designed to transmit data rather than display data
• XML labels are not predefined. You need to customize the tag.
• XML is designed to be self-descriptive.
• XML is W3C recommendation standard

For more information about XML, see the link: http://www.w3school.com.cn/xml/xml_intro.asp

How does the R language parse XML?

The R language provides an XML package for parsing XML data formats, including importing XML data and processing XML data. examples are as follows.

# Loading XML package library ('xml') # customize an XML data content <-'
   
  
   
Shujuren
    
  
   
Http://shujuren.org </url>
   
    
2016-01-0
     
  
 'Doc <-xmlParse (content, encoding = "UTF-8") xmlToList (doc) # use an R-level node representationdoc1 <-xmlTreeParse (content) xmlToList (doc1) # convert to the DataFrame type xmlToDataFrame (doc)

The result of the data box is as follows:

            text1                        shujuren2             http://shujuren.org3                      2016-01-01

Thoughts:
The address book on the mobile phone can be imported into an XML data format. how can I import and process the address book in the R language XML?
Reference link:
Export xml_rss-3520.1.html

The above is the XML package import and processing XML data format | R package content, for more information, please follow the PHP Chinese network (www.php1.cn )!

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.