/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     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: src/sgx/filesystem/io/xml/xmlreader.cpp

*/

#include "sgx/core/core.hpp"
#include "sgx/filesystem/filesystem.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 CXMLParser::get()->parseFile(m_Tree, file);
	}
	return FALSE;
}


