Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Xalan transform output to string

Reply
Thread Tools

Xalan transform output to string

 
 
Rene van Hoek
Guest
Posts: n/a
 
      11-22-2004
Hi,

I am using Xalan to transform XML with XSL stylesheets. I don't know
how too put the output into a string (e.g. std::wstring).

I know that there are classes like DOMStringPrintWriter and
XalanOutputStreamPrintWriter but I do not know how to use them.

Can someone give an example?

Thanks.

Rene
 
Reply With Quote
 
 
 
 
Rene van Hoek
Guest
Posts: n/a
 
      11-23-2004
(Rene van Hoek) wrote in message news:< om>...
> Hi,
>
> I am using Xalan to transform XML with XSL stylesheets. I don't know
> how too put the output into a string (e.g. std::wstring).
>
> I know that there are classes like DOMStringPrintWriter and
> XalanOutputStreamPrintWriter but I do not know how to use them.
>
> Can someone give an example?
>
> Thanks.
>
> Rene

Oke I found the answer, it is very simple. Use the outputstream classes from stl.

std:stringstream ostream;

XSLTResultTarget result(ostream);
int run_result = theXalanTransformer.transform(theSource, xsl.c_str(), result);
ostream.str();


Rene
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xalan-c 1.10 problem with XalanTransformer.transform rjuszkiewicz@gmail.com C++ 0 12-04-2012 12:18 PM
xalan xslt transform gaiduri@gmail.com XML 3 08-11-2007 03:43 AM
blocking I/O with javax.xml.parsers.DocumentBuilder.parse() and javax.xml.transform.Transformer.transform() jazzdman@gmail.com Java 1 03-27-2005 06:56 AM
Upgrade of Xalan 1.2.2 and Xerces 1.4.4 to Xalan 2.6 and Xerces 2.6.2 cvissy XML 0 11-16-2004 07:06 AM
'Illegal argument exception" in Xalan Transform Brian Dobby XML 0 11-28-2003 03:52 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57