4 #include <opensrf/osrf_json.h>
5 #include <libxml/parser.h>
6 #include <libxml/tree.h>
12 jsonObject* xmlDocToJSON(xmlDocPtr doc);
14 /* debug function, prints each node and content */
15 void recurse_doc( xmlNodePtr node );
18 /* turns an XML doc into a char*.
19 User is responsible for freeing the returned char*
20 if(full), then we return the whole doc (xml declaration, etc.)
21 else we return the doc from the root node down
23 char* xmlDocToString(xmlDocPtr doc, int full);
26 /* Takes an xmlChar** from a SAX callback and returns the value
27 for the attribute with name 'name'
29 char* xmlSaxAttr( const xmlChar** atts, const char* name );
32 Sets the xml attributes from atts to the given dom node
34 int xmlAddAttrs( xmlNodePtr node, const xmlChar** atts );