/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/src/sgx/filesystem/io/xml/xmlreader.cpp

*/

#include "sgx/core/core.hpp"
#include "sgx/filesystem/filesystem.hpp"
#include "utils/core/xmlfileparser.hpp"

#if 0
CXMLReader::CXMLReader() : m_Tree(m_NullTree)
{
}
#endif

CXMLReader::CXMLReader(sgxXMLTree &tree) : m_Tree(tree)
{
}

CXMLReader::~CXMLReader()
{
}

tBOOL CXMLReader::read(const sgxString &filename)
{
	CSGXFile xmlfile(filename);
	
	return read(xmlfile);
}

tBOOL CXMLReader::read(CSGXFile &file)
{
	if (file.open()) {
		return sgxXMLLoader::parseFile(m_Tree, file);
	}
	return FALSE;
}


