Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Scope of namespaces

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <wolfgang.hoschek AT mac.com>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Scope of namespaces
  • Date: Tue, 07 Feb 2006 08:34:33 -0500

Wolfgang Hoschek wrote:

That doc is 50KB small, right? If so, that would mean about 500KB/s throughput - unusable from my point of view by about 2 orders of magnitude for non-XOM-core serialization algorithms related to XPath, XQuery, STAX, bnux, etc., as those need to iterate over the declared namespaces. I certainly wouldn't use anything like that.

The numbers I quoted are upper bounds. None of the things you mention would do everything my test is doing (especially both in scope and declared) so they would be somewhat faster. However, I doubt you'd see two orders of magnitude gain.

I think the built-in XPath engine addresses both Peter's and Steve's issues quite nicely. (Steve, Peter: holler if you disagree) Indeed this is a main purpose of bundling XPath: to avoid an explosion of methods for every possible search and query someone might want to perform. I should probably put this specific query (namespaces in scope) in the FAQ though.

As time permits I'll look at the opportunities to further optimize these queries along the lines you've suggested. However for the moment it seems like XOM is fast enough and capable enough to handle most users' needs.

Also note that element.query("namespace::node()") is inefficient for reasons that have nothing to do with namespace iteration, but rather with XPath setup.


That remains to be seen. As I said, I've only measured the time of doing everything. I haven't yet profiled to see where the time is being spent.

--
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




Archive powered by MHonArc 2.6.24.

Top of Page