Load XML from string in libxml++ in C++
Does anyone familiar with libxml++ know if it's possible to load the XML document from a string instead of a file? Alternately, if it can lo开发者_如何学Cad a document directly from a web page, that would do.
Thanks
It sounds like you are looking for either xmlpp::Parser::parse_memory or xmlpp::DomParser::parse_memory.
Each of those classes also have a parse_stream
method which take a std::istream
if that is more convenient.
That's correct, ticpp::DomParser::parse_memory should do it.
精彩评论