Description Usage Arguments Value Author(s) See Also Examples
These functions and methods allow us to query and set the “name” of an XML document. This is intended to be its URL or file name or a description of its origin if raw XML content provided as a string.
1 |
doc |
the XML document object, of class
|
... |
additional methods for methods |
A character string giving the name.
If the document was created from text, this is NA
(of class character).
The assignment function returns the updated object, but the R assignment operation will return the value on the right of the assignment!
Duncan Temple Lang
xmlTreeParse
xmlInternalTreeParse
newXMLDoc
1 2 3 4 5 6 7 8 9 | f = system.file("exampleData", "catalog.xml", package = "XML")
doc = xmlInternalTreeParse(f)
docName(doc)
doc = xmlInternalTreeParse("<a><b/></a>", asText = TRUE)
# an NA
docName(doc)
docName(doc) = "Simple XML example"
docName(doc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.