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 URL as the search argument:
URL xmlURL = new URL("http://mywebsite/doc.xml"); String result = Xql.query("/bookstore/book/author", xmlURL.openStream());
Returns a Java string.