Solved

I could not parse my xml into xsl for PDF generation because of Unicode 0xB charactor. Any solution?

Posted on 2009-04-10
2
258 Views
Last Modified: 2012-08-13
I could not render my xml since  its getting Unicode special charactors while transforming it into fo:xsl for PDF generation  Any solution?
0
Comment
Question by:manishe
2 Comments
 
LVL 39

Accepted Solution

by:
abel earned 500 total points
ID: 24125890
In XML there are several characters that are "forbidden". That means, if certain characters (better say: codepoints) appear in your XML, then the XML is not valid XML, which, in XML-terms means: it is not XML at all and cannot be processed.

In such cases, the best way to deal with the problem is to go to the one (system, person, company) that gives you the XML and ask them to deliver real XML and not some crippled substrate. In some cases, however, there can be reasons to get along with the incorrect XML.

In your case, you are saying that the Unicode character 0xB is giving you troubles. 0xB is known in Unicode as "Line Tabulation" or "Vertical Tab (VT)". This is indeed an illegal character (the first allowed characters in XML are only the whitespace characters: 0x9, 0xA , 0xD, 0x20, which do not include the VT).

In XML 1.1 the VT is allowed, but only when properly escaped. Switching to the (poorly supported) XML 1.1 is not going to help you.

That leaves us to non-standard treatment of the data. We can do that in many ways, but the correct approach depends on what tools you use. Consider using a filter (if you application allows that) to remove those erroneous characters.

Note: it can happen that suppliers of XML use the wrong encoding in the header, or that readers/parsers of the data use the wrong encoding, i.e., when UTF8 is assumed, but ISO-8859-1 is used. If that is the case, we should look deeper into your parsing of the XML and the actual error you get.

-- Abel --
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question