[jdom-interest] Schema validating... during WRITING

Jorge Pacheco pacheco.jorge at gmail.com
Tue Oct 30 05:50:16 PDT 2007


Need to tell before going on that I'm not an jdom expert.

I know how to validate an existing XML against a schema while reading,
parsing; I use SAXBuilder and tell it to do it.

Now I need to do the other direction; I create on the fly an XML and I
want to validate the creation as well as the parsing.
How can I do it? Should I just create it and right afterwards read it
and validate it with SAXBuilder too?
Should I use SAXOutputter?
I can set a namespace/prefix to the root element of my new created
document, but that actually is just an "attribute" in a way, since -as
we all know- jdom is not a parser itself

I would appreciate any help.
Thanx!

Neidisch


More information about the jdom-interest mailing list