Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.1: XPath

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] XOM 1.1: XPath
  • Date: Fri, 7 Jan 2005 16:04:28 -0800

One way to look at the proposed "public Nodes query(String xpath)" is that it is simply a convenience method for
"new XQuery(xath, null).execute(contextNode).toNodes()", or, more efficiently, "XQueryPool.GLOBAL_POOL.getXQuery(xpath, null).execute(contextNode).toNodes()". I was wondering if I should add such a convenience method. The problem is that one could equally ask for several dozen similar convenience methods, none of which is essential. So for the time being I decided to leave it as a commented out demo snippet in XQueryPool.java.

Wolfgang.

On Jan 6, 2005, at 1:47 PM, Elliotte Harold wrote:

The final question is what the API will look like. My current thinking is that this will be two methods added to the Node class that look like this:

public Nodes query(String xpath) throws ToBeDeterminedException
public Nodes query(String xpath, Map namespaceBindings)
throws ToBeDeterminedException

The context node for each query would simply be the node on which the query method was invoked.





Archive powered by MHonArc 2.6.24.

Top of Page