#ifndef XMLINTERFACE_H
#define XMLINTERFACE_H

#include <string>
#include <tinyxml.h>
using namespace std;

// Macros
#define IterateXML( a, b ) for( a = b->FirstChildElement(); a != NULL; a = a->NextSiblingElement() )

/**
* XML Interface
* @version 12-26-04
* @author Joseph 'Pcjoe' Florencio
*/
class CXML_Interface
{
public:
	// Constructor
	CXML_Interface();

	/*
	* Delete Document
	*/
	void deleteDocument( void );
	/*
	* Parse
	*/
	bool Parse( std::string strXMLFile );

	/*
	* Set/Get Document
	*/
	TiXmlDocument *getDoc( void ) { return m_Document; }
	void setDoc( TiXmlDocument *pDoc ) { m_Document = pDoc; }

	/*
	* Get Document Element
	*/
	TiXmlNode *getDocElem( void );

private:
	TiXmlDocument *m_Document;
};

#endif