Products | Versions |
---|---|
TIBCO ActiveMatrix BusinessWorks | - |
Not Applicable | - |
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"?>.