Nithya Nirmal Vijayakumar wrote:
Hi,

I am a new user to Xerces-C++. I want to apply xsl transformation to xml stored in a buffer and get the output into a buffer.


This is the wrong forum for your question. Please post to the Xalan-C users list.

The StreamTransform.cpp example reads from a buffer and writes output to a stream. I tried modifying this to write to a buffer. I followed the same pattern defined in the example for converting the buffer to a stream.

This is trivial to do.


-----------------
//code from StreamTransform example to convert
//input buffer to XSLTInputsource


...

ostrstream theOutputStream(outputBuffer, strlen(outputBuffer));

The second argument to the ostrstream constructor is the length of the buffer provided as the first argument. I doubt using strlen() will work. Perhaps you meant to do something like sizeof(outputBuffer)? It's hard to tell from your post, because you did not provide the definition of outputBuffer.

At any rate, please post your question and any further information to the appropriate list.

Dave

Reply via email to