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: "Bradley S. Huffman" <hip AT cs.okstate.edu>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM 1.1: XPath
  • Date: Fri, 07 Jan 2005 09:52:25 -0600

Elliotte Harold writes:

> OK. I've looked at the code and it seems like we could wrap an array or
> list of several Text objects as a single SAXON Node. However, I'm not
> sure how we'd feed the document into SAXON inn the first place. Where's
> the class that reads through a XOM Document and wraps everything? We
> might need to change that too so that if it saw consecutive text nodes
> it accumulated them into a list before wrapping, rather than wrapping
> each one individually.

One of the advantages of using XPath with XOM, JDOM is you can
manipulate the nodes in the result set to modify the original document.
Otherwise you may as well just feed the XPath engines with a SAX converter
and receive results with a SAX builder. If 3 adjacent text nodes are wrap,
I'd hope I could do things like a single detach and all 3 nodes would be
detached from the original document. So would wrapping adjacent text nodes
in a special subclass of nu.xom.Text before feeding it to Saxon, Jaxen, etc.
work instead of tring to modify the internals of every engine that comes
along?

Brad




Archive powered by MHonArc 2.6.24.

Top of Page