You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Sebastien SACARD <se...@kelkoo.com> on 2002/08/01 16:23:33 UTC
escaping " characters ?
Hi,
I want to convert HTML files into JSP, by changing the href attributes
to JSP variables :
a href="/test.html?x=1&y=2" to a href="<%=
myClass.encode("/test.html?x=1&y=2") %>"
I converted my HTML into XHTML (with jtidy), parsed it into a Document,
and then changed all the href attributes.
But now I want to write the XHTML to disk, all the " in the href
attributes are encoded to %22.
I know that it's regular, but I don't want them to be encoded.
My question is where do I put the property to escape such character ?
DOMSource source = new DOMSource(document);
java.io.File f = new File(file);
StreamResult result = new StreamResult(f);
TransformerFactory trf = TransformerFactory.newInstance();
Transformer transformer = trf.newTransformer();
transformer.transform(source, result);
I'm a little lost between the Transformer, TransformerFactory,
StreamResults, etc ...
--
#############################################################
Sébastien Sacard
Kelkoo.com - R&D team
Phone: +(33) 4 76 29 73 51
Email: Sebastien.Sacard@kelkoo.com
Aim : KelkooXIII
#############################################################
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org