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
235 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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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 video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now