XMLChildren: Get sub-nodes of an XML node

[.XMLChildrenR Documentation

Get sub-nodes of an XML node

Description

An XML node may have child or sub-nodes. These functions allow one to access them as if they were an S list (without element names).

Usage

## S3 method for class 'XMLChildren'
x[...]
## S3 method for class 'XMLChildren'
x[[i]]

Arguments

x

the XMLChildren object containing the nodes.

...

the indeces of the nodes to retrieve.

i

the index of the single sub-node to retrieve

Details

The XMLChildren object is a reference to an internal C-level data structure managed by libxslt. From this, we extract references to the different children and represent these references as S objects.

Value

[.XMLChildren returns a list whereas [[.XMLChildren returns a single element of class XMLNode.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

http://www.omegahat.org/Sxslt, http://www.omegahat.org/SXalan, http://www.w3.org/Style/XSL http://xmlsoft.org/XSLT

See Also

[.XMLAttributes [[.XPathNodeSet node.xsl, node.xml and ok.R in the examples directory.


omegahat/Sxslt documentation built on Jan. 17, 2024, 6:44 p.m.