» Transformer not reading Special Character from Document Object
Transformer not reading Special Character from Document Object
|December 30, 2013
Posted by forumadmin
I am trying to read xml data from Document Object, and then using transformer to render the data inside the document object to pdf,using XSL,
My code is :
Document doc = toXML(arg1,arg2);
doc contains data like :
with in tags
InputStream inputStream = new FileInputStream(xslFilePath);
transformer = factory.newTransformer(new StreamSource(inputStream));
transformer.transform(new DOMSource(doc.getDocumentElement()), res);
Special characters present in xml are not getting rendered accordingly and displaying like
I have also set encoding to UTF-8 ,but still it is displaying like above.
More Related Questions
- iOS parsing of spanish letters in XML appearing strangely I'm building an iOS app that, as part of its functionality parses an XML document and sets some labels based on the data there. I've run into trouble a few times parsing a few characters - […]
- Remove characters not in specified XSLT encoding I am trying to transform an UTF-8 xml source file into an iso-8859-1 xml destination file.
I would like the the XSLT to remove all characters that are not valid in iso-8859-1. Is it […]
- Why does casting a UTF-8 VARCHAR column to XML require converting to NVARCHAR and encoding change? I am trying to convert data in a varchar column to XML but I was getting errors with certain characters. Running this ...
-- This fails
DECLARE @Data VARCHAR(1000) = '<?xml […]
- Using Visual C++/MSXML how do I convert XML from ISO-8859-1 to UTF-8? I have a C++ XML document, document A, that is retrieved from a database and placed in MSXML 4 as DOM Document. The document is in ISO-8859-1 encoding, and it has non-ASCII characters, […]
- How to echo <?xml version="1.0" encoding="utf-8"?> in a page? I'm using a script to display a page in XML, but I need it to display at start but whenever I try, it breaks the code.
Heres the code I tried:
- AJAX, encoding in XML file from server I've been using this (https://developers.google.com/maps/articles/phpsqlajax_v3) as a guide for showing a bunch of points from a MySQL database on a map. Everything works fine, until I add […]
- PHP encoding error when sending an XML file containing Cyrillic text to web service via CURL Here is my XML:
<?xml version="1.0" encoding="UTF-8"?>
- Grails not encoding in UTF-8 after posting body with contentType application/json Currently I'm working in a grails application that is using rest calls to access another application using JSON messages.
When I try to submit a form with umlauts characters (üöä) the […]
- "unmappable character for encoding" warning in Java I'm currently working on a Java project that is emitting the following warning when I compile:
/src/com/myco/apps/AppDBCore.java:439: warning: unmappable character for encoding UTF8
- Javadoc error: unmappable character for encoding ASCII Im trying to create a Javadoc but i can´t.
I have written my comments in swedish så they content charachters as å,ä,ö.
this is giving me over 248 erros.
Is there a way to change the […]