Posted on 2004-11-02
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 !!!