4 #include "objson/object.h"
5 #include <libxml/parser.h>
6 #include <libxml/tree.h>
8 jsonObject* xmlDocToJSON(xmlDocPtr doc);
11 jsonObject* _xmlToJSON(xmlNodePtr node, jsonObject*);
13 /* debug function, prints each node and content */
14 void recurse_doc( xmlNodePtr node );
17 /* turns an XML doc into a char*.
18 User is responsible for freeing the returned char*
19 if(full), then we return the whole doc (xml declaration, etc.)
20 else we return the doc from the root node down
22 char* xmlDocToString(xmlDocPtr doc, int full);