user179169
user179169

Reputation:

Parse XML with C

Hi I am trying to use C to parse xml, but all the examples I can find are using a file to get the xml, I have the xml already loaded into a variable and I want libxml2 to take the xml from there instead of a file.... but I can't figure out how!

Any help would be appreciated thanks

Upvotes: 1

Views: 10129

Answers (2)

Ozair Kafray
Ozair Kafray

Reputation: 13529

Look at the signature of xmlParseDoc function.

It takes const xmlChar * cur as a parameter, and xmlChar is actually defined as unsigned char here

Upvotes: 1

Roddy
Roddy

Reputation: 68023

Have a look at this example: using XmlReadMemory

Upvotes: 3

Related Questions