Activity Type: XML
Run an XPath query on an XMLDB data resource. The query can be run upon an individual XMLDB resource contained within a collection in the XMLDB data resource or over an entire collection of XMLDB resources. Please note that XMLDB resources are XML documents which are stored within XMLDB collections (not to be confused with an XMLDB data resource itself or data service resources).
<xPathStatement name="statement"> <collection>musicians/folksingers</collection> <resourceId>someResource</resourceId> <namespace prefix="c">http://folksingers/contact-details</namespace> <expression>/c:entry/c:address</expression> <resourceSetStream name="statementOutput"/> </xPathStatement>
Element xPathStatement:
<resourceSet>The final block is a resource set footer in the following format:
</resourceSet>These header and footer blocks will contain no other data. They are terminated by the '\n' character but contain no other whitespace.
The data blocks between the header and footer blocks contain the XML resources returned by the query. Each block will contain a single resource and each resource will be within a single block. The single root element of each XML block will be called resource. An example of a data block is:
<resource> <entry id="1"> <name>Ally Antonioletti</name> <address>826 Hume Crescent, Southampton</address> <phone>01670061244</phone> </entry> </resource>
This activity requires a data resource accessor that implements the following interface: uk.org.ogsadai.dataresource.XMLDBCollectionProvider
The use of this activity requires the following jar to be loaded on the server:
OGSA-DAI/schema/ogsadai/xsd/activities/xpath_statement.xsd
uk.org.ogsadai.activity.xmldb.XPathStatementActivity
uk.org.ogsadai.client.toolkit.activity.xmldb.XPathQuery
Up: Activities | ||
© International Business Machines Corporation, 2002-2006 | © The University of Edinburgh, 2002-2006 |