You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Neeraj Bajaj <Ne...@Sun.COM> on 2003/05/29 10:11:37 UTC
Re: parser help
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 <Ut...@lri.fr>
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: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org