You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by John Siu <Jo...@FitGlobal.com> on 2000/11/29 05:01:25 UTC
Need a small example please.
First I have to apologize I post a help request in this list. I understand
this should be a list for xalan development but I just can't find a
newsgroup about xalan on both my company and home news feeds.
What I want to do is this : Use xalan to transform a xml, which is inside a
String, with a xsl file, and have the output put back to a String.
Is this doable? If so, a small example will be highly appreciated! I did
look through the sample code and the source code of TESTxslt, but all I can
find is stream base and file base I/O.
If someone kind enough to answer this, please email me at
John.Siu@fitglobal.com (or will the mailing list automatically send the
answer back to me??)
Thank you!!
John Siu
John.Siu@fitglobal.com
RE: Need a small example please.
Posted by Dan Wahlin <wa...@home.com>.
For the InputSource class you should be able to do something like the
following:
new InputSource(new StringReader("<root></root>"));
As far as getting the string back, pass a StringWriter (StringWriter sw =
new StringWriter()) into the XSLTResultTarget as follows:
XSLTResultTarget(sw). Once you call the process() method you can then get
the output by using sw.toString(). There may be other ways but that's what
I usually do.
Hope that helps get you started,
Dan
-----Original Message-----
From: John Siu [mailto:John.Siu@FitGlobal.com]
Sent: Tuesday, November 28, 2000 9:01 PM
To: 'xalan-dev@xml.apache.org'
Subject: Need a small example please.
First I have to apologize I post a help request in this list. I understand
this should be a list for xalan development but I just can't find a
newsgroup about xalan on both my company and home news feeds.
What I want to do is this : Use xalan to transform a xml, which is inside a
String, with a xsl file, and have the output put back to a String.
Is this doable? If so, a small example will be highly appreciated! I did
look through the sample code and the source code of TESTxslt, but all I can
find is stream base and file base I/O.
If someone kind enough to answer this, please email me at
John.Siu@fitglobal.com (or will the mailing list automatically send the
answer back to me??)
Thank you!!
John Siu
John.Siu@fitglobal.com