Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

asXMLNode

Converts non-XML node objects to XMLTextNode objects


Description

This function is used to convert S objects that are not already XMLNode objects into objects of that class. Specifically, it treats the object as a string and creates an XMLTextNode object.

Also, there is a method for converting an XMLInternalNode - the C-level libxml representation of a node - to an explicit R-only object which contains the R values of the data in the internal node.

Usage

asXMLNode(x)

Arguments

x

the object to be converted to an XMLNode object. This is typically alread an object that inherits from XMLNode or a string.

Value

An object of class XMLNode.

Author(s)

Duncan Temple Lang

References

See Also

Examples

# creates an XMLTextNode.
 asXMLNode("a text node")

   # unaltered.
 asXMLNode(xmlNode("p"))

XML

Tools for Parsing and Generating XML Within R and S-Plus

v3.99-0.10
BSD_3_clause + file LICENSE
Authors
CRAN Team [ctb, cre] (de facto maintainer since 2013), Duncan Temple Lang [aut] (<https://orcid.org/0000-0003-0159-1546>), Tomas Kalibera [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.