Using the DOM apis there is no way to validate the subtree of node in the memory, however you can validate the whole document in the memory after manipulating the DOM. This is addressed in DOM L3, please check xerces faqs[1] for more detail. You might like to check JAXB apis which allows on-demand validation[2] of the sub tree.
Neeraj [1] http://xml.apache.org/xerces2-j/faqs.html [2]http://java.sun.com/webservices/docs/1.1/tutorial/doc/JAXBworks2.html#wp82802 ----- Original Message ----- From: Utsav Boobna <[EMAIL PROTECTED]> Date: Tuesday, May 27, 2003 6:18 pm Subject: parser help > Hi, > Given a DOM tree I would like to check the validity of > the > subtree of a given node, by the parser. One way which I can think > of is to > write the XML document corresponding to it and then parse it. will > it > work? is there some better and effective way of doing it ? > > also, at some stage if it is found that a particular subtree is > invalid then, > I would like to substitute its children by few different elements > and then > repeatedly check its validation for different combination of > children, so > I think writing an XML document each time wont be effective. > will some modification in the parser be helpful? > > Utsav > > > > -------------------------------------------------------------------- > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
