Queries an XML document using an input stream as the second argument.
query(String query,InputStream xmlDoc)
Where:
String query is the string you are searching for.
Input Stream xmlDoc is the XML document you are querying.
This example queries the bookstore for authors listed in bookstore.Xql.
FileInputStream xmlStream = new FileInputStream("doc.xml"); String result = Xql.query("/bookstore/book/author", xmlStream);
The following example queries an XML document on the Web using a URI as the search argument:
URI xmlURI = new URI("http://mywebsite/doc.xml"); String result = Xql.query("/bookstore/book/author", xmlURI.openStream());
Returns a Java string.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |