473,503 Members | 338 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 20 '05 #1
1 2645
rv******@hotmail.com (Rene van Hoek) wrote in message news:<10*************************@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
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5653
by: Hyunchan Kim | last post by:
To indent xml file, I made an instance of Transformer from Templates using following. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"...
1
2292
by: Fisch von Gestern | last post by:
I have tried to run the extension function/element examples provided with the Xalan-J download. I believe that my classpath is correct, and that my versions are up-to-date. However, I can't get...
7
2121
by: Ganesh Gella | last post by:
Hi All, I am planning to use Xalan to transform XML data by applying xls stylesheets. Here tricky part is, Xalan provides several C++ APIs, which are very much useful if our requirement is...
5
1760
by: John | last post by:
I'm trying to generate HTML using a SAX TransformHandler. The problem I'm having is related to the xalan transformer using the shorthand notation when it writes out an empty textarea tag. My...
1
1650
by: pgreaves | last post by:
hi there i have developed a style sheet that works fine in the XML perspective of Rational Software architect, but when i add it to my application, it appears to match no nodes. my XSL that...
1
1259
by: Sandy | last post by:
Hi, I have some data stored in my internal data structure. I am writing this data in an xml file and invoking xalan on this file to perform some transformation. After the transformation I want...
2
2318
by: intrepidca | last post by:
When I try to translate an XML file (using org.apache.xalan.xslt.Process) that has a DOCTYPE declaration, I only get the <?xml ...?> processing instruction in the output file. I get no error...
6
1490
by: thomas.porschberg | last post by:
Hi, I have the following problem: I want convert XML in the form: <?xml version="1.0" encoding="UTF-8"?> <dataset> ...
3
2305
by: =?iso-8859-1?q?Eduardo_Y=E1=F1ez_Parareda?= | last post by:
Hello, I have to use xalan to transform some XML using XSL, but I have some problems within the XSLs, and Xalan doesn't give very good error messages. Is there any way to put Xalan on debug or...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.