Search code examples
cbase64libxml2

Base64 decode output of xmlNodeGetContent


I am slowly learning libxml2 API (version is 2.9.10) and I think I missing something obvious after a call to xmlNodeGetContent.

I am getting the base64 data stored in the XML file using:

xmlChar *base64_data = xmlNodeGetContent(cur);

What API from libxml2 should I use to decode the base64 back to the original binary ? Grepping the source code, all I can find is xmlBase64Decode which does not seems to be exported.


Solution

  • libxml2 offers no API to decode base64. You have to do it manually or use another library.