Hi Ragu, You did not mention which parsing are you using viz. SAX/DOM parsing!.
In case you are using DOM parsing, you can try using the property dom/current-element-node, which will give you the current node. You can then traverse back from that node and get the full tree. See: http://xml.apache.org/xerces2-j/properties.html#dom.current-element-node for more details. Cheers, Rahul. > Ragunath Marudhachalam wrote... > > Hello All, > > I have been able to validate a xml document with a schema. I do have the > handler class and i'm able to print the error messages and also the line > number where the error has occured. For some reasons i need to have the > whole tree structure of the element where the error has occured. For > example, if the xml document is like this, > > <a> > <b> > <c> > <d> > </d> > > </c> > > </b> > > </a> > > and the error is at the element <d>, then i need to get the whole tree > structure from the root element, like a/b/c/d.... is it possible > to get that > in someway.. As far as i know, i havent found a direct method to do > that...It would be a real help if anybody could suggest me some method or > with some sample code.... > > Thanks > > Ragu > CircuitVision > > > > --------------------------------------------------------------------- > 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]
