Description Usage Arguments Details See Also Examples
Used to get/set certain slots from objects of class XiMpLe.doc
and XiMpLe.node
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | XMLName(obj)
## S4 method for signature 'XiMpLe.node'
XMLName(obj)
XMLName(obj) <- value
## S4 replacement method for signature 'XiMpLe.node'
XMLName(obj) <- value
XMLAttrs(obj)
## S4 method for signature 'XiMpLe.node'
XMLAttrs(obj)
XMLAttrs(obj) <- value
## S4 replacement method for signature 'XiMpLe.node'
XMLAttrs(obj) <- value
XMLChildren(obj)
## S4 method for signature 'XiMpLe.node'
XMLChildren(obj)
## S4 method for signature 'XiMpLe.doc'
XMLChildren(obj)
XMLChildren(obj) <- value
## S4 replacement method for signature 'XiMpLe.node'
XMLChildren(obj) <- value
## S4 replacement method for signature 'XiMpLe.doc'
XMLChildren(obj) <- value
XMLValue(obj)
## S4 method for signature 'XiMpLe.node'
XMLValue(obj)
XMLValue(obj) <- value
## S4 replacement method for signature 'XiMpLe.node'
XMLValue(obj) <- value
XMLFile(obj)
## S4 method for signature 'XiMpLe.doc'
XMLFile(obj)
XMLFile(obj) <- value
## S4 replacement method for signature 'XiMpLe.doc'
XMLFile(obj) <- value
XMLDecl(obj)
## S4 method for signature 'XiMpLe.doc'
XMLDecl(obj)
XMLDecl(obj) <- value
## S4 replacement method for signature 'XiMpLe.doc'
XMLDecl(obj) <- value
XMLDTD(obj)
## S4 method for signature 'XiMpLe.doc'
XMLDTD(obj)
XMLDTD(obj) <- value
## S4 replacement method for signature 'XiMpLe.doc'
XMLDTD(obj) <- value
XMLScan(obj, name, as.list = FALSE)
## S4 method for signature 'XiMpLe.node'
XMLScan(obj, name, as.list = FALSE)
## S4 method for signature 'XiMpLe.doc'
XMLScan(obj, name, as.list = FALSE)
XMLScan(obj, name) <- value
## S4 replacement method for signature 'XiMpLe.node'
XMLScan(obj, name) <- value
## S4 replacement method for signature 'XiMpLe.doc'
XMLScan(obj, name) <- value
XMLScanDeep(obj, find = NULL, search = "attributes")
## S4 method for signature 'XiMpLe.node'
XMLScanDeep(obj, find = NULL, search = "attributes")
## S4 method for signature 'XiMpLe.doc'
XMLScanDeep(obj, find = NULL, search = "attributes")
|
obj |
An object of class |
value |
The new value to set. |
name |
Character, name of nodes to scan for. |
as.list |
Logical, if |
find |
Character, name of element to scan for. |
search |
Character, name of the slot to scan, one of |
These are convenience methods to get or set slots from XML objects without using the @
operator.
XMLName()
: get/set the XML node name (slot name
of class XiMpLe.node
)
XMLAttrs()
: get/set the XML node attributes (slot attrs
of class XiMpLe.node
)
XMLValue()
: get/set the XML node value (slot value
of class XiMpLe.node
)
XMLChildren()
: get/set the XML child nodes (slot children
of both classes XiMpLe.node
and XiMpLe.doc
)
XMLFile()
: get/set the XML document file name (slot file
of class XiMpLe.doc
)
XMLDecl()
: get/set the XML document declaration (slot xml
of class XiMpLe.doc
)
XMLDTD()
: get/set the XML document doctype definition (slot dtd
of class XiMpLe.doc
)
Another special method can scan a node/document tree object for appearances of nodes with a particular name:
XMLScan(obj, name,
as.list=FALSE)
: get/set the XML nodes by name (recursively searches slot name
of both classes
XiMpLe.node
and XiMpLe.doc
). If as.list=TRUE
allways returns a list (or NULL),
otherwise if exactly one result is found,
it will be returned as as single XiMpLe.node
.
Finally, there is a method to scan for certain values in XiMpLe objects and just list them. For instance, it can be used to list all instances of a certain attribute type in a document tree:
XMLScanDeep(obj, find,
search="attributes")
: returns all found instances of find
in all slots defined by search
.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.