Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I write a DOM Document into a istream?

Posted on 2008-10-23
2
983 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

856 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