[jdom-interest] DOMBuilder with customized adapter

Christian Holmqvist christian at ideit.com
Fri Feb 16 06:01:02 PST 2001


Hi

I'm know to this mailing list (as well as to useing JDom). First of all,
thank you for finally making XML java adopted... !!

Now to my questions:

I'm in the situation where would like to use XML for validation of values
passed to a server application from different clients. The perfect tool for
this would of course be XML Schema but since the support for Schemas is
failing short (please prove me false here...) I'm sticking to DTD.
So I have created my own Adapter class extending the
org.jdom.adopters.AbstractAdapter this to be able to adapte my parser to
suit my need.
But now to the problem, the org.jdom.input.DOMBuilder rellay completely on
reflection of the adapter class, I want to be able to customize it for
different reasons. This would normally not be a problem if the
org.jdom.input.DOMBuilder.buildTree() method would not have been private!!!
I really don't want to implement my own DOMBuilder (i.e. basically cut and
past the buildTree method from DOMBuilder...).
Is there a way to maybe not relay so much on reflection since most of the
values are hardcoded into the class anyway.

Also the Adapter classes should provide a more flexible way to configure
them, for example to adapt the different features provided.

If there is a bether way to do what I have in mind (tried to describe
*smile*) please come with suggestions.

Thank you for your time!

Cheers Christian
---------------------------
Innovative IT - Sweden
http://www.innovative-it.com
acroo at iname.com




More information about the jdom-interest mailing list