]> git.evergreen-ils.org Git - Evergreen.git/blob - OpenSRF/src/utils/xml_utils.h
3b6c936e1b0af2fc81dc69120337590f868ad7ea
[Evergreen.git] / OpenSRF / src / utils / xml_utils.h
1 #ifndef _XML_UTILS_H
2 #define _XML_UTILS_H
3
4 #include "objson/object.h"
5 #include <libxml/parser.h>
6 #include <libxml/tree.h>
7
8 jsonObject* xmlDocToJSON(xmlDocPtr doc);
9
10 /* helper function */
11 jsonObject* _xmlToJSON(xmlNodePtr node, jsonObject*);
12
13 /* debug function, prints each node and content */
14 void recurse_doc( xmlNodePtr node );
15
16
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
21         */
22 char* xmlDocToString(xmlDocPtr doc, int full);
23
24 #endif