IT_Bus::XMLOutputStream Class Reference

#include <it_bus/xml_output_stream.h>

List of all members.


Detailed Description

Specialized output stream fow writing XML content.

Typically, an instance of this class is used by a class derived from WSDLNode to write its corresponding in-memory WSDL model.

For example,

 // The WSDL model may be obtained from the Service
 // IT_WSDL::WSDLDefinitions is a subclass of IT_WSDL::WSDLNode.
 IT_WSDL::WSDLDefinitions &definitions = service.get_definitions();

 // Now initialize an XMLOutputStream and invoke the write()
 // method on the WSDLDefinitions object.
 IT_Bus::FileOutputStream stream("<path to, and name of, the output file>");
 IT_Bus::XMLOutputStream xml_stream(stream, true);
 definitions.write(xml_stream);
 stream.close();
 

Definition at line 40 of file xml_output_stream.h.

Public Types

enum  EscapeFlags
 EscapeFlags. More...

Public Member Functions

 XMLOutputStream (OutputStream &output_stream, bool write_header=true) throw ((IOException))
 Create an XMLOuputStream with UTF-8 encoding.
 XMLOutputStream (OutputStream &output_stream, const char *encoding, bool write_header=true) throw ((IOException))
 Create an XMLOuputStream with an encoding.

Private Attributes

XMLOutputStreamImpl * m_impl


Member Enumeration Documentation

enum IT_Bus::XMLOutputStream::EscapeFlags

EscapeFlags.

NO_ESCAPES: No character needs to be escaped. Just write them out as is.

STD_ESCAPES: The following characters need to be escaped: character should be escaped and written as & & > > " " < < ' '

ATTR_ESCAPES: The following characters need to be escaped: character should be escaped and written as & & > > " "

CHAR_ESCAPES: The following characters need to be escaped: character should be escaped and written as & & > >

NO_TRANSCODE_OR_ESCAPES: No transcoding or escaping of characters to be peformed.

ESCAPE_FLAGS_COUNT: Special value, do not use directly.

ASCII_7BIT_NO_ESCAPES: No transcoding or escaping of ascii 7bit characters.

DEFAULT_ESCAPE: Special value, do not use directly.

Definition at line 81 of file xml_output_stream.h.


Constructor & Destructor Documentation

IT_Bus::XMLOutputStream::XMLOutputStream ( OutputStream output_stream,
bool  write_header = true 
) throw ((IOException))

Create an XMLOuputStream with UTF-8 encoding.

Parameters:
output_stream The underlying stream to encode into.
write_header If true an XML header will be written out.

IT_Bus::XMLOutputStream::XMLOutputStream ( OutputStream output_stream,
const char *  encoding,
bool  write_header = true 
) throw ((IOException))

Create an XMLOuputStream with an encoding.

Parameters:
output_stream The underlying stream to encode into.
encoding The XML encoding to use.
write_header If true an XML header will be written out.


Generated on Tue Mar 20 15:28:09 2007 for Artix by  doxygen 1.5.1-p1