org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

xerces-j-users | Adam Fowler | 2 decades ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    [xX][mM][lL] etc...

    xerces-j-users | 2 decades ago | Adam Fowler
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
  2. 0

    Struts mapping exception

    Stack Overflow | 4 years ago | 123Ex
    org.xml.sax.SAXParseException: The content of element type "action-mappings" must match "(action)*".
  3. 0

    Re: encoding problem

    ws-wsif-user | 1 decade ago | Aleksander Slominski
    org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x4) was found in the element content of the document.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The following information is printed when I try to parse an XML file saved in UTF-8 BOM format: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) If I save the very XML file to standard UTF-8 format then everything works smoothly. I've tried to debug the source code of Xecers. I found that Xecers actually has codes that handle UTF-8 BOM formatted input stream in class org.apache.xerces.impl.XMLEntityManager.java (@version $Id: XMLEntityManager.java,v 1.94 2005/04/19 03:18:18 mrglavas Exp $). But those codes has never been executed in my case. The following is the detail: In public method setupCurrentEntity() in class XMLEntityManager, there are several lines of codes which dealing with UTF-8 BOM format input stream, and all those codes are located in the code block starting from line 929 if ( reader == null ) { .... }. The "reader" in the if clause is defined in line 923. And In my case, the reader would not be assigned a "null" value so that the codes which dealing with UTF-8 BOM would never been executed.

    Apache's JIRA Issue Tracker | 1 decade ago | lin zhu
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
  6. 0

    XML complained

    Oracle Community | 10 years ago | 843841
    org.jdom.input.JDOMParseException: Error on line 19 of document file:///C:/..../Java/watij/hierarchy/login.xml: The reference to entity "search_case_number" must end with the ';' delimiter.

  1. rp 1 times, last 4 months ago
4 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.xml.sax.SAXParseException

    The processing instruction target matching "[xX][mM][lL]" is not allowed.

    at org.apache.xerces.parsers.AbstractSAXParser.parse()
  2. Xerces2-j
    AbstractSAXParser.parse
    1. org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1110)
    1 frame
  3. uk.ac.aber
    XMLInterpreter$InputThread.run
    1. uk.ac.aber.compsci.aff9.common.xmltransport.XMLInterpreter$InputThread.run(XMLInterpreter.java:152)
    1 frame