On Mon, 5 Mar 2001, Kimpton,C (Chris) wrote:
> Hi,
>
> >
> >
> > If you just use the JAXP API, the JBoss code should work with
> > both. The only notable omission from JAXP is a standard way
> > to write out
> > XML files from a Document, but you could encapsulate that and have it
> > detect the current parser and do the right thing. Then a user can use
> > whatever parser they prefer for their application, and JBoss shouldn't
> > care. Ain't standards great? :)
> >
>
> I've noticed that DependancyManager only uses it in a redundant method
> loadXML - which is not used anywhere... - so I've removed it.
>
> I plan to add an XMLHelper class to the org.jboss.util that will handle the
> writing of an xml file - using the available parser - by guessing the
> implementation and using reflection to call the appropriate method - so that
> it doesn't need to be compiled in. Does this sound ok?
Why not just write a class which can output an XML file? It's not hard,
there's an example of how to do it in the Xerces examples - it looks
horribly complicated, but you only need about 50 lines from it to actually
do the writing, the rest is not necessary. It'll even do canonical
form. This may be necessary, since not every parser has a method to write
the XML out to a stream.
Tom