xoreos  0.0.5
Public Member Functions | Private Attributes | List of all members
Common::XMLParser Class Reference

Class to parse a ReadStream into a simple XML tree. More...

#include <xml.h>

Inheritance diagram for Common::XMLParser:
Inheritance graph
[legend]
Collaboration diagram for Common::XMLParser:
Collaboration graph
[legend]

Public Member Functions

 XMLParser (ReadStream &stream, bool makeLower=false, const UString &fileName="stream.xml")
 Parse an XML file out of a stream. More...
 
 ~XMLParser ()
 
const XMLNodegetRoot () const
 Return the XML root node. More...
 

Private Attributes

ScopedPtr< XMLNode_rootNode
 

Detailed Description

Class to parse a ReadStream into a simple XML tree.

Definition at line 51 of file xml.h.

Constructor & Destructor Documentation

◆ XMLParser()

Common::XMLParser::XMLParser ( ReadStream stream,
bool  makeLower = false,
const UString fileName = "stream.xml" 
)

Parse an XML file out of a stream.

Parameters
streamThe stream to read the XML from.
makeLowerShould all tags be converted to lowercase, to ease case-insensitive comparison?
fileNameThe file name to tell libxml2. Only used for error reporting.

Definition at line 75 of file xml.cpp.

References _rootNode, Common::StackException::add(), Common::UString::c_str(), Common::closeStream(), Common::UString::empty(), Common::errorFuncUString(), and Common::readStream().

Here is the call graph for this function:

◆ ~XMLParser()

Common::XMLParser::~XMLParser ( )

Definition at line 105 of file xml.cpp.

Member Function Documentation

◆ getRoot()

const XMLNode & Common::XMLParser::getRoot ( ) const

Return the XML root node.

Definition at line 108 of file xml.cpp.

References _rootNode.

Referenced by Aurora::TextureAtlasFile::load(), Engines::DragonAge::Campaign::readManifest(), Engines::DragonAge2::Campaign::readManifest(), and Graphics::Aurora::ModelNode_DragonAge::readMAOXML().

Here is the caller graph for this function:

Member Data Documentation

◆ _rootNode

ScopedPtr<XMLNode> Common::XMLParser::_rootNode
private

Definition at line 66 of file xml.h.

Referenced by getRoot(), and XMLParser().


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