Error message when parsing XML, "The processing instruction target matching "[xX][mM][lL]" is not allowed..BW-XML-100005"

Error message when parsing XML, "The processing instruction target matching "[xX][mM][lL]" is not allowed..BW-XML-100005"

book

Article ID: KB0091743

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
According to the XML specification: http://www.w3.org/TR/REC-xml/#sec-well-formed

Definition: A textual object is a well-formed XML document if:

1). Taken as a whole, it matches the production labeled document.

2). It meets all the well-formedness constraints given in this specification.

3). Each of the parsed entities which is referenced directly or indirectly within the document is well-formed.

Then:

document    ::=    prolog element Misc*
prolog    ::=    XMLDecl? Misc* (doctypedecl Misc*)?
XMLDecl    ::=    '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

Nothing should appear before "<?xml..." (except for Byte Order ark, which is part of the same entity).

In general, the problem is that SAX parser doesn't allow any characters before <?xml version="1.0" encoding="UTF-8"?> when parsing XML, not just TAB, CR or line feed.
You can have TAB, CR or LF in the XML but not before <?xml version="1.0" encoding="UTF-8"?>.

Issue/Introduction

Error message when parsing XML, "The processing instruction target matching "[xX][mM][lL]" is not allowed..BW-XML-100005"