2 * Summary: Tree debugging APIs
3 * Description: Interfaces to a set of routines used for debugging the tree
4 * produced by the XML parser.
6 * Copy: See Copyright for the status of this software.
8 * Author: Daniel Veillard
14 #include <libxml/xmlversion.h>
15 #include <libxml/tree.h>
17 #ifdef LIBXML_DEBUG_ENABLED
19 #include <libxml/xpath.h>
26 * The standard Dump routines.
28 XMLPUBFUN void XMLCALL
29 xmlDebugDumpString (FILE *output,
31 XMLPUBFUN void XMLCALL
32 xmlDebugDumpAttr (FILE *output,
35 XMLPUBFUN void XMLCALL
36 xmlDebugDumpAttrList (FILE *output,
39 XMLPUBFUN void XMLCALL
40 xmlDebugDumpOneNode (FILE *output,
43 XMLPUBFUN void XMLCALL
44 xmlDebugDumpNode (FILE *output,
47 XMLPUBFUN void XMLCALL
48 xmlDebugDumpNodeList (FILE *output,
51 XMLPUBFUN void XMLCALL
52 xmlDebugDumpDocumentHead(FILE *output,
54 XMLPUBFUN void XMLCALL
55 xmlDebugDumpDocument (FILE *output,
57 XMLPUBFUN void XMLCALL
58 xmlDebugDumpDTD (FILE *output,
60 XMLPUBFUN void XMLCALL
61 xmlDebugDumpEntities (FILE *output,
64 /****************************************************************
68 ****************************************************************/
71 xmlDebugCheckDocument (FILE * output,
74 /****************************************************************
78 ****************************************************************/
80 XMLPUBFUN void XMLCALL
81 xmlLsOneNode (FILE *output, xmlNodePtr node);
83 xmlLsCountNode (xmlNodePtr node);
85 XMLPUBFUN const char * XMLCALL
86 xmlBoolToText (int boolval);
88 /****************************************************************
90 * The XML shell related structures and functions *
92 ****************************************************************/
94 #ifdef LIBXML_XPATH_ENABLED
96 * xmlShellReadlineFunc:
97 * @prompt: a string prompt
99 * This is a generic signature for the XML shell input function.
101 * Returns a string which will be freed by the Shell.
103 typedef char * (* xmlShellReadlineFunc)(char *prompt);
108 * A debugging shell context.
109 * TODO: add the defined function tables.
111 typedef struct _xmlShellCtxt xmlShellCtxt;
112 typedef xmlShellCtxt *xmlShellCtxtPtr;
113 struct _xmlShellCtxt {
117 xmlXPathContextPtr pctxt;
120 xmlShellReadlineFunc input;
125 * @ctxt: a shell context
126 * @arg: a string argument
127 * @node: a first node
128 * @node2: a second node
130 * This is a generic signature for the XML shell functions.
132 * Returns an int, negative returns indicating errors.
134 typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
139 XMLPUBFUN void XMLCALL
140 xmlShellPrintXPathError (int errorType,
142 XMLPUBFUN void XMLCALL
143 xmlShellPrintXPathResult(xmlXPathObjectPtr list);
144 XMLPUBFUN int XMLCALL
145 xmlShellList (xmlShellCtxtPtr ctxt,
149 XMLPUBFUN int XMLCALL
150 xmlShellBase (xmlShellCtxtPtr ctxt,
154 XMLPUBFUN int XMLCALL
155 xmlShellDir (xmlShellCtxtPtr ctxt,
159 XMLPUBFUN int XMLCALL
160 xmlShellLoad (xmlShellCtxtPtr ctxt,
164 #ifdef LIBXML_OUTPUT_ENABLED
165 XMLPUBFUN void XMLCALL
166 xmlShellPrintNode (xmlNodePtr node);
167 XMLPUBFUN int XMLCALL
168 xmlShellCat (xmlShellCtxtPtr ctxt,
172 XMLPUBFUN int XMLCALL
173 xmlShellWrite (xmlShellCtxtPtr ctxt,
177 XMLPUBFUN int XMLCALL
178 xmlShellSave (xmlShellCtxtPtr ctxt,
182 #endif /* LIBXML_OUTPUT_ENABLED */
183 #ifdef LIBXML_VALID_ENABLED
184 XMLPUBFUN int XMLCALL
185 xmlShellValidate (xmlShellCtxtPtr ctxt,
189 #endif /* LIBXML_VALID_ENABLED */
190 XMLPUBFUN int XMLCALL
191 xmlShellDu (xmlShellCtxtPtr ctxt,
195 XMLPUBFUN int XMLCALL
196 xmlShellPwd (xmlShellCtxtPtr ctxt,
202 * The Shell interface.
204 XMLPUBFUN void XMLCALL
205 xmlShell (xmlDocPtr doc,
207 xmlShellReadlineFunc input,
210 #endif /* LIBXML_XPATH_ENABLED */
216 #endif /* LIBXML_DEBUG_ENABLED */
217 #endif /* __DEBUG_XML__ */