wyatt
wyatt

Reputation: 3246

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 load a document directly from a web page, that would do.

Thanks

Upvotes: 0

Views: 1147

Answers (2)

wash
wash

Reputation: 497

That's correct, ticpp::DomParser::parse_memory should do it.

Upvotes: 0

R Samuel Klatchko
R Samuel Klatchko

Reputation: 76541

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.

Upvotes: 2

Related Questions