Description Usage Arguments Value Author(s) References See Also
This function loads one or more documents into the XML manager as Zorba Item objects. These can then be assembled into a collection, for example, and used in a query.
1 | loadDocument(doc, asText = rep(NA, length(doc)), isURI = rep(NA, length(doc)), xmlManager = xmlDataManager())
|
xmlManager |
the XML manager instantace associated with the Zorba instance in which we want to use the documents. |
doc |
a character vector or list giving the documents. |
asText |
a logical vector that indicates whether each element in
|
isURI |
a logical vector indicating whether each element is a URI
or a regular file name. This is combined with |
A zorba::ItemList in which each object is an Item object, a reference to an C++-level object.
Duncan Temple Lang
XQuery http://www.w3.org/TR/xquery/
Zorba http://www.zorba-xquery.com/
mgr = xmlDataManager() # only the first 9 senate bills. billsDir = system.file("sampleDocs", "bills", package = "RXQuery") filenames = list.files(billsDir, pattern = "s[1-9].*.xml", full.names = TRUE) items = loadDocument(mgr, filenames) col = createCollection(mgr, "http://www.govtrack.org/bills") q = 'for $ti in collection("http://www.govtrack.org/bills")/*/introduced/@datetime return $ti;'
e = xquery(q)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.