Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# irr::io::IXMLWriter Class Reference

Interface providing methods for making it easier to write XML files. More...

`#include <IXMLWriter.h>`

Inheritance diagram for irr::io::IXMLWriter:

List of all members.

## Public Member Functions
virtual void | writeClosingTag (const wchar_t *name)=0
| Writes the closing tag for an element. Like "</foo>".
virtual void | writeComment (const wchar_t *comment)=0
| Writes a comment into the xml file.
virtual void | writeElement (const wchar_t *name, bool empty, core::array< core::stringw > &names, core::array< core::stringw > &values)=0
| Writes an xml element with any number of attributes.
virtual void | writeElement (const wchar_t *name, bool empty=false, const wchar_t *attr1Name=0, const wchar_t *attr1Value=0, const wchar_t *attr2Name=0, const wchar_t *attr2Value=0, const wchar_t *attr3Name=0, const wchar_t *attr3Value=0, const wchar_t *attr4Name=0, const wchar_t *attr4Value=0, const wchar_t *attr5Name=0, const wchar_t *attr5Value=0)=0
virtual void | writeLineBreak ()=0
| Writes a line break.
virtual void | writeText (const wchar_t *text)=0
| Writes a text into the file.
virtual void | writeXMLHeader ()=0
| Writes an xml 1.0 header.
virtual | ~IXMLWriter ()
| Destructor.

## Detailed Description

Interface providing methods for making it easier to write XML files.

This XML Writer writes xml files using in the platform dependent wchar_t format and sets the xml-encoding correspondingly.

Definition at line 20 of file IXMLWriter.h.

## Constructor & Destructor Documentation

virtual irr::io::IXMLWriter::~IXMLWriter | ( |  | ) | `[inline, virtual]`

Destructor.

Definition at line 25 of file IXMLWriter.h.

## Member Function Documentation

virtual void irr::io::IXMLWriter::writeClosingTag | ( | const wchar_t * | name | ) | `[pure virtual]`

Writes the closing tag for an element. Like "</foo>".

virtual void irr::io::IXMLWriter::writeComment | ( | const wchar_t * | comment | ) | `[pure virtual]`

Writes a comment into the xml file.

virtual void irr::io::IXMLWriter::writeElement | ( | const wchar_t * | name,
|  | bool | empty,
|  | core::array< core::stringw > & | names,
|  | core::array< core::stringw > & | values |
| ) |  |  | `[pure virtual]`

Writes an xml element with any number of attributes.

virtual void irr::io::IXMLWriter::writeElement | ( | const wchar_t * | name,
|  | bool | empty = `false`,
|  | const wchar_t * | attr1Name = `0`,
|  | const wchar_t * | attr1Value = `0`,
|  | const wchar_t * | attr2Name = `0`,
|  | const wchar_t * | attr2Value = `0`,
|  | const wchar_t * | attr3Name = `0`,
|  | const wchar_t * | attr3Value = `0`,
|  | const wchar_t * | attr4Name = `0`,
|  | const wchar_t * | attr4Value = `0`,
|  | const wchar_t * | attr5Name = `0`,
|  | const wchar_t * | attr5Value = `0` |
| ) |  |  | `[pure virtual]`

Writes an xml element with maximal 5 attributes like "<foo />" or <foo optAttr="value" />. The element can be empty or not.

Parameters:

  | name,: | Name of the element
  | empty,: | Specifies if the element should be empty. Like "<foo />". If You set this to false, something like this is written instead: "<foo>".
  | attr1Name,: | 1st attributes name
  | attr1Value,: | 1st attributes value
  | attr2Name,: | 2nd attributes name
  | attr2Value,: | 2nd attributes value
  | attr3Name,: | 3rd attributes name
  | attr3Value,: | 3rd attributes value
  | attr4Name,: | 4th attributes name
  | attr4Value,: | 4th attributes value
  | attr5Name,: | 5th attributes name
  | attr5Value,: | 5th attributes value

virtual void irr::io::IXMLWriter::writeLineBreak | ( |  | ) | `[pure virtual]`

Writes a line break.

virtual void irr::io::IXMLWriter::writeText | ( | const wchar_t * | text | ) | `[pure virtual]`

Writes a text into the file.

All occurrences of special characters such as & (&), < (<), > (>), and " (") are automaticly replaced.

virtual void irr::io::IXMLWriter::writeXMLHeader | ( |  | ) | `[pure virtual]`

Writes an xml 1.0 header.

Looks like <?xml version="1.0"?>. This should always be called before writing anything other, because also the text file header for unicode texts is written out with this method.

The documentation for this class was generated from the following file:

- IXMLWriter.h

| The Irrlicht Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:12 2010 by Doxygen (1.5.6)