Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Hydra Core Library Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::XmlStreamWriter

Group:  XML Related


rwsf::XmlStreamWriter rwsf::XmlWriter

Local Index

Members

Header File

#include <rwsf/core/XmlStreamWriter.h>

Description

rwsf::XmlStreamWriter implements an rwsf::XmlWriter that uses an std::ostream as a data sink. The class inherits most functions from rwsf::XmlWriter. This class can be constructed on any std::ostream implementation.

Example

#include <rwsf/core/XmlStreamWriter.h>
#include <rwsf/core/XmlName.h>
#include <iostream>
#include <fstream>

int main (void)
{

  std::ofstream out("output.xml");
  rwsf::XmlStreamWriter w(out);

  rwsf::XmlNamespace rw("rw",
                    "http://roguewave.example.com/xml-ol");

  rwsf::XmlName message("message", rw);

  w.writeElementStart(message);
  w.write("Hello, World!");
  w.writeElementEnd(message);

  return 0;
}

Writes the following output to output.xml:

<rw:message xmlns:rw="http://roguewave.example.com/xml-ol">Hello, World!</rw:message>

Public Constructors

XmlStreamWriter(std::ostream& out);

Public Member Functions

virtual void
flush();

See Also

rwsf::XmlWriter



Previous fileTop of DocumentContentsIndex pageNext file

©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks and HydraSDO is a trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.