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 )!