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
277 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I bind the results to a grid 3 48
parse convert xml feed to text (python) 2 115
Online tools to transform xml to excel using xsl 1 54
tutorial for ebay api 3 99
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

737 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