xclass: (Advanced) Construct R objects from XML document queries

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/functions-xml.R View source: R/functions-xml.R

Description

This function takes an xml object, created from readXml, and an xpath query referencing an element of the document,and returns an R object represneting the element.

The xpath query must retrive an element, not an attribute.

Usage

1
xclass(doc, xpathq, prefix = character(0))

Arguments

doc

An XMLInternalDocument retrieved using readXml.

xpathq

A length-1 character string representing an xpath query into the document.

prefix

A prefix used to map, when necessary, between the XML class name and the corresponding R class. For NetAffx-based classes, the prefix is ‘Affx’; no prefix is required for DTT or ARR documents.

Value

An R object corresponding to the class(es) referenced by the xpath query.

Author(s)

Martin Morgan

References

http://www.w3.org/TR/xpath provides a very useful description of xpath. Addiitonal references are in the vignette 'Retrieving MAGE and ARR sample attributes'.

See Also

The vignettes ‘Retrieving MAGE and ARR sample attributes’ and ‘Annotation retrieval with NetAffxResource’ for detailed illustration of use.

readXml for appropriately reading XML documents.

Examples

1

AffyCompatible documentation built on Nov. 1, 2018, 2:24 a.m.