Link to home
Start Free TrialLog in
Avatar of pgoel
pgoel

asked on

xml validation

Hello,

 I am creating an xml document using DOM implementation by Xerces in java . I would like to validate each element using the pre-defined xml schema when its(xml file) created rather than validate the whole file at a time. Basically the idea is to get rid of the invalid xml elements (may get due to database errors) at the time of creating xml file itself. I know to set the validation features on the domparser to validate the whole file but need to know how can I validate element by element i.e on the fly. Can anyone help me with a snippet of the code to do this....

Thanks in advance !!!

Goel.
Avatar of Celdric
Celdric

Whoa, know almost nothing of this, but its interesting.
My limited knowledge of XML Parses tell me to ask you if you have considered
DTD's although i dont know how they work I know they are used to check
XML tags and invalidate the ones that dont match up to the DTD syntax.

If you like, i could do some research later on at lunch time and help you out.

But maybe you are too far an expert and already know DTDs, which, if you are I ask you
to share the details here, so I can learn some :D

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of mightyone
mightyone

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Interesting, im gonna check the link too :D
Regards mighty!