Reputation: 2542
I am stuck with this error
org.xml.sax.SAXException: Parser configuration problem: namespace reporting is not enabled at net.sf.saxon.event.ReceivingContentHandler.getNameCode(ReceivingContentHandler.java:383) at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:289)
while running the following code
xmlHandler.startElement("D:\XmlFiles\XmlFromRhapsody.xml", "", qName, atts);
xmlHandler is --> TransformerHandler xmlHandler;
I am not sure of enabling namespace.
Upvotes: 2
Views: 2306
Reputation: 51
You can fix this by supplying the localname when calling the startElement method. This means that you to make the same calls to the ContentHandler that a namespace-aware XML parser would make.
So, you have ..
xmlHandler.startElement("D:\XmlFiles\XmlFromRhapsody.xml", "", qName, atts);
You need to add the local name as the 2nd parameter instead of leaving it blank.
Also, If you don't want to make these changes you can use saxon-8.9.0.4.jar which should work without any errors.
Upvotes: 1