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