cancel
Showing results for 
Search instead for 
Did you mean: 

Why parser error

Former Member
0 Kudos

Hi guys,

I am using

DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();

xml = builder.parse(DocuContent.getInputStream());

But I got

com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 6e(:main:, row:1, col:1682)(:main:, row=1, col=1682) -> com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 6e(:main:, row:1, col:1682)

What would be the problem, is something wrong with my XML data?

Thanks for ur hint!

Reg.

Liying

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Liying,

it seems that with UTF-8 encoding you have some problem with characters like this:

ä(E4), ü(FC). ecc

Hope this help

Francesco

Answers (1)

Answers (1)

former_member192798
Active Contributor
0 Kudos

Hi Liying,

Can you paste the xml here.

On seeing the error message, I could understand that your xml document is not well formed. Cross check the start and the end tags of each and every nesting level.

Regards.

Praveen

Former Member
0 Kudos

Hi Praveen ,

here is my XML:

I can not open it online: I got the error:

Die XML-Seite kann nicht angezeigt werden

Die XML-Eingabe kann nicht angezeigt werden, wenn Stylesheet XSL verwendet wird. Beheben Sie den Fehler und klicken Sie dann auf Aktualisieren, oder wiederholen Sie den Vorgang später.

-

-


Im Textinhalt wurde ein ungültiges Zeichen gefunden. Fehler beim Bearbeiten der Ressource 'http://mira03.iv.brnet.int:50100...

<?xml version="1.0" encoding="utf-8"?><templateConfig templateId="br_project_template" rootpath="/room_extensions/c...

stefan_grube
Active Contributor
0 Kudos

The DOM parser expects UTF-8, but your XML is latin-1.

How does the xml come to XI?

If it comes from file adapter, you have to apply the codepage ISO-8859-1 there. Then the file adapter changes the code page to UTF-8.

Regards

Stefan

Former Member
0 Kudos

Thanks Francesco and Stefen,

u are right!That's the reason