Consultor Eletrônico



Kbase P104160: Error 9082 loading an XML document containing extended characters.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/10/2008
Status: Unverified

SYMPTOM(s):

Error 9082 loading an XML document

X-NODEREF or X-DOCUMENT <method-name> got an error: <xml-exception>. (9082)

X-NODEREF or X-DOCUMENT LOAD got an error: FATAL ERROR: file <file name>, line <line number>, column <column number>, message 'Expected end of tag <tag name>'. (9082)

XML document contains extended (non ASCII) characters.

XML document does not contain an XML header specifying the 'encoding' clause.

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

CAUSE:

The extended characters are in a codepage other than UTF-8.

When the XML document has an XML header without the 'encoding' clause, or does not have an XML at all, the parser expects the document to be using the UTF-8 codepage. If the extended characters within the document are, for example, in the iso-8859-1 codepage, the single bytes that represent those characters are actually invalid characters under UTF-8. The parser therefore rightfully refuses to load the XML document.

FIX:

Re-create the XML document ensuring that either it's generated in the UTF-8 codepage, or it has a valid XML header contains the 'encoding' clause, as in the following example:

<?xml version="1.0" encoding="iso-8859-1" ?>
<Customers>
<Customer FirstName="Kyösti">
<Customer SecondName="Raphaël"/>
</Customer>
</Customers>