I tried to use &ParserName; to parse an HTML file and it generated an error. What did I do wrong?
Unfortunately, HTML does not, in general, follow the XML grammar rules. Most HTML files do not meet the XML style guidelines. Therefore, the XML parser generates XML well-formedness errors.
Typical errors include:
HTML must match the XHTML standard for well-formedness before it
can be parsed by &ParserName; or any other XML parser. You can
find the
I get an "invalid UTF-8 character" error.
There are many Unicode characters that are not allowed in an
XML document, according to the XML spec. Typical disallowed
characters are control characters, even if you escape them
using the Character Reference form: &#xxxx; . See the XML 1.0
specification, sections
I get an error when I access EBCDIC XML files, what is happening?
If an XML document/file is not UTF-8, then you MUST specify the encoding. When transcoding a UTF8 document to EBCDIC, remember to change this:
I get an error on the EOF character (0x1A) -- what is happening?
You are probably using the LPEX editor, which automatically inserts an End-of-file character (0x1A) at the end of your XML document (other editors might do this as well). Unfortunately, the EOF character (0x1A) is an illegal character according to the XML specification, and &ParserName; correctly generates an error.