lsxml::XmlWriter< _Ty > Class Template Reference

xml writer class More...

#include <lsxml.h>

Inheritance diagram for lsxml::XmlWriter< _Ty >:

lsxml::BaseObject lsxml::BaseObject List of all members.

Public Member Functions

 XmlWriter (int flags=XWF_DEFAULT)
 ctor
 XmlWriter (OutputStream< _Ty > *s, int flags=XRF_DEFAULT)
 ctor
 ~XmlWriter ()
 dtor
void WriteComment (const _Ty *comment)
 writes a xml comment
void WriteStartTag (const _Ty *name, const XmlAttribute< _Ty > *attribs, bool close=false)
 writes an opening tag
void WriteEndTag (const _Ty *name)
 writes a closing tag
void WriteText (const _Ty *name, bool inlineText, bool cdata=false)
 writes character data
void SetFlags (int flags)
 sets the writer flags
int GetFlags () const
 returns the writer flags
 XmlWriter (int flags=XWF_DEFAULT)
 Constructor.
 XmlWriter (OutputStream< _Ty > *s, int flags=XRF_DEFAULT)
 Constructor.
 ~XmlWriter ()
 Destructor.
void WriteComment (const _Ty *comment)
 Writes a xml comment node.
void WriteStartTag (const _Ty *name, const XmlAttribute< _Ty > *attribs, bool close=false)
 Writes an opening element tag.
void WriteEndTag (const _Ty *name)
 Writes a closing element tag.
void WriteText (const _Ty *value, bool inlineText, bool cdata=false)
 Writes a text node.
void SetFlags (int flags)
 Sets the writer flags.
int GetFlags () const
 Returns the writer flags.
bool OpenFile (const _Ty *filename)
 Opens the specified file for writing.

Detailed Description

template<typename _Ty>
class lsxml::XmlWriter< _Ty >

xml writer class


Constructor & Destructor Documentation

template<typename _Ty>
lsxml::XmlWriter< _Ty >::XmlWriter ( int  flags = XWF_DEFAULT  )  [inline]

Constructor.

Parameters:
flags writer flags
See also:
XmlWriterFlags

template<typename _Ty>
lsxml::XmlWriter< _Ty >::XmlWriter ( OutputStream< _Ty > *  s,
int  flags = XRF_DEFAULT 
) [inline]

Constructor.

Parameters:
s the output stream
flags writer flags
See also:
XmlWriterFlags


Member Function Documentation

template<typename _Ty>
void lsxml::XmlWriter< _Ty >::WriteComment ( const _Ty *  comment  ) 

Writes a xml comment node.

Parameters:
comment comment value

template<typename _Ty>
void lsxml::XmlWriter< _Ty >::WriteStartTag ( const _Ty *  name,
const XmlAttribute< _Ty > *  attribs,
bool  close = false 
)

Writes an opening element tag.

Parameters:
name element name
attribs attribute list
close if true, produces an empty tag

template<typename _Ty>
void lsxml::XmlWriter< _Ty >::WriteEndTag ( const _Ty *  name  ) 

Writes a closing element tag.

Parameters:
name the tag's name. Can be NULL if the XWF_REMEMBER_TAG_NAMES flag was specified.

template<typename _Ty>
void lsxml::XmlWriter< _Ty >::WriteText ( const _Ty *  value,
bool  inlineText,
bool  cdata = false 
)

Writes a text node.

Parameters:
value the node's value
inlineText controls indentation
cdata specifies if the text should be a CDATA section

template<typename _Ty>
bool lsxml::XmlWriter< _Ty >::OpenFile ( const _Ty *  filename  )  [inline]

Opens the specified file for writing.

Parameters:
filename name of the file to open
Returns:
true on success, false otherwise


The documentation for this class was generated from the following files:
Generated on Tue Sep 29 14:51:12 2009 for lsxml by  doxygen 1.5.1-p1