[jdom-interest] Some add-ons to JDOM
Jason Hunter
jhunter at collab.net
Mon Feb 12 17:59:18 PST 2001
"de Grijs, Rudolf" wrote:
>
> Hi,
>
> I'm new to this list and I would, just like you, contribute to this list to
> make JDOM a perfect tool to work with XML documents.
Wonderful! Welcome.
> First of all we would like to be able to filter the result document. So I
> dived into the source and I was able to implement an efficient callback
> mechanism that's called during the build of the document (using the SAX
> parser).
Does the SAXBuilder.setXMLFilter() not take care of this?
> Another wish (which is high on the wishlist I assume) is the ability to
> query the result document with XPath. I had a look at the work done so far,
> but I was not able to get it working,
You tried the latest distribution pointed at under jdom-contrib? If you
had problems, you should raise them to Bob who's implementing it.
> document is not null when an element is part of a document (detecting if a
> Element is the root should be done as follows * (document != null && parent
> == null) * instead of
> * (document != null) *
In the current impl it shouldn't ever happen that (doc != null and
parent != null) so the extra parent check would be extraneous. If you
think there's a bug, perhaps you could submit a tiny code sample
demo'ing? Make sure to use the latest daily code, as we don't want to
expend effort fixing an already fixed bug.
> Furthermore I don't think it's good practice to allow list operations as the
> basis for document maintenance, since you're breaking the implementation.
> E.g. if I want to add different axes using different containers. Within the
> methods addContent and removeContent I'm able to synchronize all used
> structures. So as far as I'm concerned they are revived from their
> deprecated status.
The remove methods were officially reinstated. I'm not sure what you're
saying about list operations, but the lists returned are live and if you
want to synchronize you have to do so externally, as explained in the
FAQ.
> I have never contributed anything to the community so far, so could someone
> tell me how to proceed (if it's of any use)?
Posts to the mailing list are a fine way to contribute. If you have
code you want integrated, you can post that here also for review.
Hope this helps,
-jh-
More information about the jdom-interest
mailing list