ReactOS  0.4.14-dev-1314-gacf135d
debugXML.h
Go to the documentation of this file.
1 /*
2  * Summary: Tree debugging APIs
3  * Description: Interfaces to a set of routines used for debugging the tree
4  * produced by the XML parser.
5  *
6  * Copy: See Copyright for the status of this software.
7  *
8  * Author: Daniel Veillard
9  */
10 
11 #ifndef __DEBUG_XML__
12 #define __DEBUG_XML__
13 #include <stdio.h>
14 #include <libxml/xmlversion.h>
15 #include <libxml/tree.h>
16 
17 #ifdef LIBXML_DEBUG_ENABLED
18 
19 #include <libxml/xpath.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /*
26  * The standard Dump routines.
27  */
28 XMLPUBFUN void XMLCALL
29  xmlDebugDumpString (FILE *output,
30  const xmlChar *str);
31 XMLPUBFUN void XMLCALL
32  xmlDebugDumpAttr (FILE *output,
34  int depth);
35 XMLPUBFUN void XMLCALL
36  xmlDebugDumpAttrList (FILE *output,
38  int depth);
39 XMLPUBFUN void XMLCALL
40  xmlDebugDumpOneNode (FILE *output,
42  int depth);
43 XMLPUBFUN void XMLCALL
44  xmlDebugDumpNode (FILE *output,
46  int depth);
47 XMLPUBFUN void XMLCALL
48  xmlDebugDumpNodeList (FILE *output,
50  int depth);
51 XMLPUBFUN void XMLCALL
52  xmlDebugDumpDocumentHead(FILE *output,
53  xmlDocPtr doc);
54 XMLPUBFUN void XMLCALL
55  xmlDebugDumpDocument (FILE *output,
56  xmlDocPtr doc);
57 XMLPUBFUN void XMLCALL
58  xmlDebugDumpDTD (FILE *output,
59  xmlDtdPtr dtd);
60 XMLPUBFUN void XMLCALL
61  xmlDebugDumpEntities (FILE *output,
62  xmlDocPtr doc);
63 
64 /****************************************************************
65  * *
66  * Checking routines *
67  * *
68  ****************************************************************/
69 
71  xmlDebugCheckDocument (FILE * output,
72  xmlDocPtr doc);
73 
74 /****************************************************************
75  * *
76  * XML shell helpers *
77  * *
78  ****************************************************************/
79 
80 XMLPUBFUN void XMLCALL
81  xmlLsOneNode (FILE *output, xmlNodePtr node);
83  xmlLsCountNode (xmlNodePtr node);
84 
85 XMLPUBFUN const char * XMLCALL
86  xmlBoolToText (int boolval);
87 
88 /****************************************************************
89  * *
90  * The XML shell related structures and functions *
91  * *
92  ****************************************************************/
93 
94 #ifdef LIBXML_XPATH_ENABLED
95 
103 typedef char * (* xmlShellReadlineFunc)(char *prompt);
104 
111 typedef struct _xmlShellCtxt xmlShellCtxt;
112 typedef xmlShellCtxt *xmlShellCtxtPtr;
113 struct _xmlShellCtxt {
114  char *filename;
115  xmlDocPtr doc;
117  xmlXPathContextPtr pctxt;
118  int loaded;
119  FILE *output;
120  xmlShellReadlineFunc input;
121 };
122 
134 typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
135  char *arg,
137  xmlNodePtr node2);
138 
139 XMLPUBFUN void XMLCALL
140  xmlShellPrintXPathError (int errorType,
141  const char *arg);
142 XMLPUBFUN void XMLCALL
143  xmlShellPrintXPathResult(xmlXPathObjectPtr list);
144 XMLPUBFUN int XMLCALL
145  xmlShellList (xmlShellCtxtPtr ctxt,
146  char *arg,
148  xmlNodePtr node2);
149 XMLPUBFUN int XMLCALL
150  xmlShellBase (xmlShellCtxtPtr ctxt,
151  char *arg,
153  xmlNodePtr node2);
154 XMLPUBFUN int XMLCALL
155  xmlShellDir (xmlShellCtxtPtr ctxt,
156  char *arg,
158  xmlNodePtr node2);
159 XMLPUBFUN int XMLCALL
160  xmlShellLoad (xmlShellCtxtPtr ctxt,
161  char *filename,
163  xmlNodePtr node2);
164 #ifdef LIBXML_OUTPUT_ENABLED
165 XMLPUBFUN void XMLCALL
166  xmlShellPrintNode (xmlNodePtr node);
167 XMLPUBFUN int XMLCALL
168  xmlShellCat (xmlShellCtxtPtr ctxt,
169  char *arg,
171  xmlNodePtr node2);
172 XMLPUBFUN int XMLCALL
173  xmlShellWrite (xmlShellCtxtPtr ctxt,
174  char *filename,
176  xmlNodePtr node2);
177 XMLPUBFUN int XMLCALL
178  xmlShellSave (xmlShellCtxtPtr ctxt,
179  char *filename,
181  xmlNodePtr node2);
182 #endif /* LIBXML_OUTPUT_ENABLED */
183 #ifdef LIBXML_VALID_ENABLED
184 XMLPUBFUN int XMLCALL
185  xmlShellValidate (xmlShellCtxtPtr ctxt,
186  char *dtd,
188  xmlNodePtr node2);
189 #endif /* LIBXML_VALID_ENABLED */
190 XMLPUBFUN int XMLCALL
191  xmlShellDu (xmlShellCtxtPtr ctxt,
192  char *arg,
194  xmlNodePtr node2);
195 XMLPUBFUN int XMLCALL
196  xmlShellPwd (xmlShellCtxtPtr ctxt,
197  char *buffer,
199  xmlNodePtr node2);
200 
201 /*
202  * The Shell interface.
203  */
204 XMLPUBFUN void XMLCALL
205  xmlShell (xmlDocPtr doc,
206  char *filename,
207  xmlShellReadlineFunc input,
208  FILE *output);
209 
210 #endif /* LIBXML_XPATH_ENABLED */
211 
212 #ifdef __cplusplus
213 }
214 #endif
215 
216 #endif /* LIBXML_DEBUG_ENABLED */
217 #endif /* __DEBUG_XML__ */
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
GLuint buffer
Definition: glext.h:5915
void * arg
Definition: msvc.h:10
#define XMLPUBFUN
Definition: xmlexports.h:30
const char * filename
Definition: ioapi.h:135
Definition: tree.h:406
struct node node
const WCHAR * str
Definition: cookie.c:201
BOOL loaded
Definition: xmlview.c:54
Definition: tree.h:489
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
unsigned char xmlChar
Definition: xmlstring.h:28
Definition: _list.h:228
GLenum GLenum GLenum input
Definition: glext.h:9031
Definition: tree.h:551
#define XMLCALL
Definition: tree.h:434
Definition: dlist.c:348
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31