given some xml and an xsd, how to remove extra stuff in the xml.

Hi. I have a question. I am trying to use the various XML libraries to parse/validate an xml file given an XSD schema. I want to remove the extra stuff in the xml to output a new xml. The problem is as I validate or parse the SAXParseException it produce only gives me the localName. Is there a way I can keep track of something detail like the XPath as I validate or parse? Thank for the help in advanced

[412 byte] By [NightWinga] at [2007-11-27 9:34:04]
# 1
forgot to mention. Basically, I want to try to validate and find all the errors in the an old xml, then be able to fix the errors to end up having an valid xml file.
NightWinga at 2007-7-12 22:57:20 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...