Home | Class list | Files | Namespace Members | Class members | File members |
#include <irrXML.h>
Public Member Functions | |
virtual int | getAttributeCount () const =0 |
Returns attribute count of the current XML node. | |
virtual const char_type * | getAttributeName (int idx) const =0 |
Returns name of an attribute. | |
virtual const char_type * | getAttributeValue (const char_type *name) const =0 |
Returns the value of an attribute. | |
virtual const char_type * | getAttributeValue (int idx) const =0 |
Returns the value of an attribute. | |
virtual float | getAttributeValueAsFloat (int idx) const =0 |
Returns the value of an attribute as float. | |
virtual float | getAttributeValueAsFloat (const char_type *name) const =0 |
Returns the value of an attribute as float. | |
virtual int | getAttributeValueAsInt (int idx) const =0 |
Returns the value of an attribute as integer. | |
virtual int | getAttributeValueAsInt (const char_type *name) const =0 |
Returns the value of an attribute as integer. | |
virtual const char_type * | getAttributeValueSafe (const char_type *name) const =0 |
Returns the value of an attribute in a safe way. | |
virtual const char_type * | getNodeData () const =0 |
Returns data of the current node. | |
virtual const char_type * | getNodeName () const =0 |
Returns the name of the current node. | |
virtual EXML_NODE | getNodeType () const =0 |
Returns the type of the current XML node. | |
virtual ETEXT_FORMAT | getParserFormat () const =0 |
Returns format of the strings returned by the parser. | |
virtual ETEXT_FORMAT | getSourceFormat () const =0 |
Returns format of the source xml file. | |
virtual bool | isEmptyElement () const =0 |
Returns if an element is an empty element, like <foo />. | |
virtual bool | read ()=0 |
Reads forward to the next xml node. | |
virtual | ~IIrrXMLReader () |
Destructor. |
You can create an instance of this reader using one of the factory functions createIrrXMLReader(), createIrrXMLReaderUTF16() and createIrrXMLReaderUTF32(). If using the parser from the Irrlicht Engine, please use IFileSystem::createXMLReader() instead. For a detailed intro how to use the parser, see Example and Features.
The typical usage of this parser looks like this:
#include <irrXML.h> using namespace irr; // irrXML is located in the namespace irr::io using namespace io; void main() { // create the reader using one of the factory functions IrrXMLReader* xml = createIrrXMLReader("config.xml"); if (xml == 0) return; // file could not be opened // parse the file until end reached while(xml->read()) { // based on xml->getNodeType(), do something. } // delete the xml parser after usage delete xml; }
Definition at line 273 of file irrXML.h.
|
Destructor.
|
|
Returns attribute count of the current XML node. This is usually non null if the current node is EXN_ELEMENT, and the element has attributes.
|
|
Returns name of an attribute.
|
|
Returns the value of an attribute.
|
|
Returns the value of an attribute.
|
|
Returns the value of an attribute as float.
|
|
Returns the value of an attribute as float.
|
|
Returns the value of an attribute as integer.
|
|
Returns the value of an attribute as integer.
|
|
Returns the value of an attribute in a safe way. Like getAttributeValue(), but does not return 0 if the attribute does not exist. An empty string ("") is returned then.
|
|
Returns data of the current node. Only non null if the node has some data and it is of type EXN_TEXT or EXN_UNKNOWN. |
|
Returns the name of the current node. Only non null, if the node type is EXN_ELEMENT.
|
|
Returns the type of the current XML node.
|
|
Returns format of the strings returned by the parser. This will be UTF8 for example when you created a parser with IrrXMLReaderUTF8() and UTF32 when it has been created using IrrXMLReaderUTF32. It should not be necessary to call this method and only exists for informational purposes. |
|
Returns format of the source xml file. It is not necessary to use this method because the parser will convert the input file format to the format wanted by the user when creating the parser. This method is useful to get/display additional informations. |
|
Returns if an element is an empty element, like <foo />.
|
|
Reads forward to the next xml node.
|