when using SAX validated parsing, checking an XML document against an XML schema, the errororg.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 95; The prefix "SOMEPREFIX" for element "PREFIX:ELEMENTNAME" is not bound. is raised.
Indeed the element is missing the namespace but the xml document is created by some 3rd party, hence I tried to use an XMLFilter to add the missing namespace. However it's the root element that is missing the namespace and only the 'startDocument' method of the XMLFilter is called in the parsing chain. How can I add a namespace to the root element?
I've searched and read many articles already but could not find a solution yet. Thanks for any pointers.
Add a comment
|