27 #ifndef _RL_XML_DOMPARSER_H_
28 #define _RL_XML_DOMPARSER_H_
31 #include <boost/shared_array.hpp>
32 #include <boost/shared_ptr.hpp>
33 #include <libxml/parser.h>
46 parser(xmlNewParserCtxt(), xmlFreeParserCtxt)
54 Document readFile(const ::std::string& filename, const ::std::string& encoding =
"",
const int& options = 0)
const
56 xmlDocPtr doc = xmlCtxtReadFile(this->
parser.get(), filename.c_str(), encoding.c_str(), options);
66 Document readMemory(const ::std::string& buffer, const ::std::string& url =
"", const ::std::string& encoding =
"",
const int& options = 0)
const
68 xmlDocPtr doc = xmlCtxtReadMemory(this->
parser.get(), buffer.c_str(),
static_cast< int >(buffer.size()), url.c_str(), encoding.c_str(), options);
81 ::boost::shared_ptr< xmlParserCtxt >
parser;
86 #endif // _RL_XML_DOMPARSER_H_