Solved

How do I write a DOM Document into a istream?

Posted on 2008-10-23
2
980 Views
Last Modified: 2013-11-13
I would like to know how to write a Xerces DOM Document tree into a istream type.(preferably with an example).

 I will later need to pass this stream for XSLT transformation (in xalan).

ps: second sentence is only for your better understanding of the situation
0
Comment
Question by:Cool-Guy
2 Comments
 
LVL 3

Accepted Solution

by:
romanm earned 500 total points
ID: 22844815
In general, I would create two objects,
1. A file handler that implements the IStream
2. A MyXMLWriter class that implements XMLFormatTarget and writes into an IStream object.

You create a MyXMLWriter object, set the file handler as its IStream,
Use the serializing sample to handle the writing to the MyXMLWriter object (see samples from links below)

here is some help
http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html

and look for DOMLSSerializer in the following:
http://xerces.apache.org/xerces-c/program-dom-3.html#XercesDOMFeatures

my 2 cents
0
 

Author Closing Comment

by:Cool-Guy
ID: 31509196
Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question