hi,
I use xalan to transform xml data to html
the xml data resides in a database the code is
something like:
String xmlData = new String();
//...
TransformerFactory tFactory = TransformerFactory.newInstance();
StringReader sr = new StringReader(xmlData);
Source xmlSource = new StreamSource(sr);
Source xslSource = new StreamSource(new URL("http://127.0.0.1:8080/aik/wordxml.xsl").openStream());
Transformer transformer = tFactory.newTransformer(xslSource);
transformer.transform(xmlSource, new StreamResult(out));
but the generated html's character encoding isn't what it's supposed to be
i guess the problem might be that i use StringReader instead of an InputStream, but is there a safe way to initialize an InputStream with
a String?
thanks in advance for any help