![]() |
Xalan transform output to string
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 |
Re: Xalan transform output to string
rvanhoek@hotmail.com (Rene van Hoek) wrote in message news:<1061bb5.0411220842.34cef288@posting.google.c 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::ostringstream ostream; XSLTResultTarget result(ostream); int run_result = theXalanTransformer.transform(theSource, xsl.c_str(), result); ostream.str(); Rene |
| All times are GMT. The time now is 03:14 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.