Learn R Programming

⚠️There's a newer version (3.99-0.20) of this package.Take me there.

XML (version 1.9-0)

Tools for parsing and generating XML within R and S-Plus.

Description

Parsing facilities for arbitrary XML files, DTDs and HTML, offering both event and tree based parsers which are customizable with R functions.

Copy Link

Version

Install

install.packages('XML')

Monthly Downloads

289,018

Version

1.9-0

License

BSD.

Maintainer

Duncan Lang

Last Published

November 8th, 2025

Functions in XML (1.9-0)

XMLNode-class

Classes to describe an XML node object.
genericSAXHandlers

SAX generic callback handler list
supportsExpat

Determines which native XML parsers are being used.
toHTML

Create an HTML representation of the given R object, using internal C-level nodes
xmlNamespaceDefinitions

Get definitions of any namespaces defined in this XML node
xmlGetAttr

Get the value of an attribute in an XML node
xmlEventHandler

Default handlers for the SAX-style event XML parser
parseDTD

Read a Document Type Definition (DTD)
xmlElementsByTagName

Retrieve the children of an XML node with a specific tag name
xmlSize

The number of sub-elements within an XML node.
SAXState-class

A virtual base class defining methods for SAX parsing
dtdElement

Gets the definition of an element or entity from a DTD.
xmlAttributeType

The type of an XML attribute for element from the DTD
xmlApply

Applies a function to each of the children of an XMLNode
xmlHandler

Example XML Event Parser Handler Functions
free

Release the specified object and clean up its memory usage
parseURI

Parse a URI string into its elements
xmlAttrs

Get the list of attributes of an XML node.
xmlEventParse

XML Event/Callback element-wise Parser
print.XMLAttributeDef

Methods for displaying XML objects
xmlRoot

Get the top-level XML node.
xmlTree

An internal, updatable DOM object for building XML trees
dtdIsAttribute

Query if a name is a valid attribute of a DTD element.
Doctype

Constructor for DTD reference
XMLInternalDocument-class

Class to represent reference to C-level data structure for an XML document
length.XMLNode

Determine the number of children in an XMLNode object.
names.XMLNode

Get the names of an XML nodes children.
addChildren

Add child nodes to an XML node
xmlFlatListTree

Constructors for trees stored as flat list of nodes with information about parents and children.
asXMLNode

Converts non-XML node objects to XMLTextNode objects
dtdElementValidEntry

Determines whether an XML element allows a particular type of sub-element.
[<-.XMLNode

Assign sub-nodes to an XML node
xmlChildren

Gets the sub-nodes within an XMLNode object.
xmlParent

Get parent node of XMLInternalNode or ancestor nodes
catalogResolve

Look up an element via the XML catalog mechanism
xmlDOMApply

Apply function to nodes in an XML tree/DOM.
xmlTreeParse

XML Parser
Doctype-class

Class to describe a reference to an XML DTD
saveXML

Output internal XML Tree
toString.XMLNode

Creates string representation of XML node
xmlOutputBuffer

XML output streams
startElement.SAX

Generic Methods for SAX callbacks
xmlNode

Create an XML node
libxmlVersion

Get the version of the libxml library.
[.XMLNode

Convenience accessors for the children of XMLNode objects.
xmlValue

Extract the contents of a leaf XML node
xmlName

Extraces the tag name of an XMLNode object.
addNode

Add a node to a tree
xmlContainsEntity

Checks if an entity is defined within a DTD.
getNodeSet

Find matching nodes in an internal XML tree/DOM
xmlNamespace

Retrieve the namespace value of an XML node.
dtdValidElement

Determines whether an XML tag is valid within another.
append.xmlNode

Add children to an XML node
newXMLDoc

Create internal XML node or document object
asXMLTreeNode

Convert a regular XML node to one for use in a "flat" tree