[jdom-interest] [off-topic] SaxPath?

Attila Szegedi szegedia at freemail.hu
Tue Oct 2 02:03:48 PDT 2001

It's strange - just last night I was thinking about an XML object model that would be dinamically generated backed by a SAX parser, always containing only the current element and its ancestors, and eventually a single level of children. It came to my mind as I thought about transforming XML documents using template engines and stream-based XML (that is, SAX) instead of load-it-all-in-memory approach (JDOM). I'd be interested in similar stuff myself -- or write one if there isn't any. 

It seems to me that a particular subclassing of SAXBuilder and JDOM core classes would do the job, altough it could be called "abuse" as the new Element etc. classes would pretty much violate existing API contracts -- they'd all have "destructive readout" semantics due to the stream nature of SAX. I mean, you could iterate only once through the list you get with getChildren(), and other weird looking behavior.

I know I'm not speaking clearly, but it still didn't outline clearly in my head; however I thought I'll speak as it could raise ideas.


----- Original Message ----- 
From: "Jon Baer" <jonbaer at digitalanywhere.com>
To: <jdom-interest at jdom.org>
Sent: 2001. október 1. 19:38
Subject: [jdom-interest] [off-topic] SaxPath?

> Question for the XMLperts on the list.  Is there anything out there that is like an
> XPath for SAX?  When I mean is like something that you can give a path to, "build"
> and get the results, kinda like a path based SAXBuilder for JDOM, for example it
> would be cool to have something like:
> SAXBuilder b = new SAXBuilder();
> b.setXPath("a path here");
> Kinda like a filter that only builds those objects found within the path.  Maybe this
> already exists and Im missing it, anyone help?  The point is that I want an easy way
> to deal with only the elements Im interested in without having to create another
> SAXHandler.
> - Jon
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2848 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20011002/81cfe3c6/smime.bin

More information about the jdom-interest mailing list