Skip to content

XML prolog and encoding

April 13, 2010
tags:
SLG4J – simple logging facade for java. wrapper for all logging librariesXML namespace – Prolog that contains:

PI – processing instructions – information that is targeted for the application itselfversion declaration – for the applicationcommentsDTD – for the parseDTD and Document Type Declarations are often mixed up, so remember that Document Type Definition (DTD) ist part of the Document Type Declaration
———————

XML Encoding ErrorsIf you load an XML document, you can get two different errors indicating encoding problems:
An invalid character was found in text content.

———————————–

You get this error if your XML contains non ASCII characters, and the file was saved as single-byte ANSI (or ASCII) with no encoding specified. Single byte XML file with encoding attribute. Same single byte XML file with no encoding attribute.
Switch from current encoding to specified encoding not supported.

—————————————

You get this error if your XML file was saved as double-byte Unicode (or UTF-16) with a single-byte encoding (Windows-1252, ISO-8859-1, UTF-8) specified.You also get this error if your XML file was saved with single-byte ANSI (or ASCII), with double-byte encoding (UTF-16) specified.
Double byte XML file without encoding.Same double byte XML file with single byte encoding.

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: