Hi Rahul,

Thanks for the tip. I'm using DOM Parser. I went thru the link u gave me,
but i didnt get to know how to use it. I mean to set the property, and how
to get the element name. If you dont mind, could u plz help me as how to use
it or give me a small sample of how to use it, coz so far i have only used
setting features. I am very thankful for your time and help.

Ragu
CircuitVision



-----Original Message-----
From: Rahul Srivastava [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 13, 2003 2:14 AM
To: [EMAIL PROTECTED]
Subject: RE: How to get the full parent child path on schema validation.


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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to