xmlName {XML}R Documentation

Extraces the tag name of an XMLNode object.

Description

Each XMLNode object has a tag name introduced in the <name ...> entry in an XML document. This function returns that name.

Usage

xmlName(node)

Arguments

node The XMLNode object whose tag name is being requested.

Value

A character vector of length textit{1} which is the node$name entry.

Author(s)

Duncan Temple Lang

References

http://www.w3.org/XML, http://www.jclark.com/xml, http://www.omegahat.org

See Also

xmlChildren, xmlAttrs, xmlTreeParse

Examples

 fileName <- system.file("data", "test.xml", pkg="XML") 
 doc <- xmlTreeParse(fileName)
 xmlName(doc$doc$children[[1]])