Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] does XOM offer any performance advantages for me?

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: jason mazzotta <jazzdman AT comcast.net>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] does XOM offer any performance advantages for me?
  • Date: Fri, 25 Mar 2005 09:11:16 -0800

With some luck the StreamingPathFilter might be convenient in your situation:
http://dsd.lbl.gov/nux/api/nux/xom/xquery/StreamingPathFilter.html

Wolfgang.

On Mar 25, 2005, at 8:34 AM, jason mazzotta wrote:

I guess I am confused. I assume the examples that are listed here :

http://www.cafeconleche.org/XOM/samples.xhtml#d0e598

are the ones in xom-samples.jar. I've read through most of them and by and large they seem to deal with an element without considering the relationship to its parent. The way I imagine things, you'd build a HashMap for the relationship of the name of an element to the name of its parent, from root to leaf, and then check that for each element in finishMakingElement to decide whether it should be included. Things would get more complex in my case, because the leaves I would want to include would actually have to check their great-great-grandparents to see if they should be included.

Jason


On Mar 25, 2005, at 10:24 AM, Elliotte Rusty Harold wrote:

jason mazzotta wrote:
Hi,
I'm relatively new to using XML, and I'm working on a project that I think ultimately is a big lesson is what NOT to use XML for. That said, I've found XOM and I'm trying to understand if there are any performance advantages in using it for what I want to do. From reading the JavaDoc for the NodeFactory and the examples, it can be used to help find particular nodes in an XML tree. I'd be interested in trying to prune my XML document down to a particular branch with its leaves intact. Can I do that with a NodeFactory, or would that end up being so complex that I'd be better off simply taking the performance hit of constructing the DOM for the entire document?

This is *exactly* what NodeFactory is designed to do. It should be fairly simple to do this. There are examples of this in the nu.xom.samples package. If you get confused, holler.



-- Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ ref=nosim


_______________________________________________
XOM-interest mailing list
XOM-interest AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest





Archive powered by MHonArc 2.6.24.

Top of Page