http://swpat.ffii.org/
Action against software patents
http://www.gnome.org/
Gnome2 Logo
http://www.w3.org/Status
W3C Logo
http://www.redhat.com/
Red Hat Logo
http://xmlsoft.org/
Made with Libxml2 Logo
Module debugXML from libxml2
API Menu
../index.html
Main Menu
../docs.html
Developer Menu
../examples/index.html
Code Examples
index.html
API Menu
libxml-parser.html
Parser API
libxml-tree.html
Tree API
libxml-xmlreader.html
Reader API
../guidelines.html
XML Guidelines
../ChangeLog.html
ChangeLog
API Indexes
../APIchunk0.html
Alphabetic
../APIconstructors.html
Constructors
../APIfunctions.html
Functions/Types
../APIfiles.html
Modules
../APIsymbols.html
Symbols
Related links
http://mail.gnome.org/archives/xml/
Mail archive
http://xmlsoft.org/XSLT/
XSLT libxslt
http://phd.cs.unibo.it/gdome2/
DOM gdome2
http://www.aleksey.com/xmlsec/
XML-DSig xmlsec
ftp://xmlsoft.org/
FTP
http://www.zlatkovic.com/projects/libxml/
Windows binaries
http://www.blastwave.org/packages.php/libxml2
Solaris binaries
http://www.explain.com.au/oss/libxml2xslt.html
MacOsX binaries
http://libxmlplusplus.sourceforge.net/
C++ bindings
http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4
PHP bindings
http://sourceforge.net/projects/libxml2-pas/
Pascal bindings
http://rubyforge.org/projects/xml-tools/
Ruby bindings
http://tclxml.sourceforge.net/
Tcl bindings
http://bugzilla.gnome.org/buglist.cgi?product=libxml2
Bug Tracker
libxml-chvalid.html
Prev
libxml-chvalid.html
chvalid
index.html
Up
index.html
API documentation
../index.html
Home
../index.html
The XML C parser and toolkit of Gnome
libxml-dict.html
dict
libxml-dict.html
Next
Interfaces to a set of routines used for debugging the tree produced by the XML parser.
Table of Contents
Structure
#xmlShellCtxt
xmlShellCtxt
struct _xmlShellCtxt
Typedef
libxml-debugXML.html#xmlShellCtxt
xmlShellCtxt
*
xmlShellCtxtPtr
const char *
#xmlBoolToText
xmlBoolToText
(int boolval)
int
#xmlDebugCheckDocument
xmlDebugCheckDocument
(FILE * output,
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc)
void
#xmlDebugDumpAttr
xmlDebugDumpAttr
(FILE * output,
libxml-tree.html#xmlAttrPtr
xmlAttrPtr
attr,
int depth)
void
#xmlDebugDumpAttrList
xmlDebugDumpAttrList
(FILE * output,
libxml-tree.html#xmlAttrPtr
xmlAttrPtr
attr,
int depth)
void
#xmlDebugDumpDTD
xmlDebugDumpDTD
(FILE * output,
libxml-tree.html#xmlDtdPtr
xmlDtdPtr
dtd)
void
#xmlDebugDumpDocument
xmlDebugDumpDocument
(FILE * output,
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc)
void
#xmlDebugDumpDocumentHead
xmlDebugDumpDocumentHead
(FILE * output,
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc)
void
#xmlDebugDumpEntities
xmlDebugDumpEntities
(FILE * output,
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc)
void
#xmlDebugDumpNode
xmlDebugDumpNode
(FILE * output,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
int depth)
void
#xmlDebugDumpNodeList
xmlDebugDumpNodeList
(FILE * output,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
int depth)
void
#xmlDebugDumpOneNode
xmlDebugDumpOneNode
(FILE * output,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
int depth)
void
#xmlDebugDumpString
xmlDebugDumpString
(FILE * output,
const
libxml-xmlstring.html#xmlChar
xmlChar
* str)
int
#xmlLsCountNode
xmlLsCountNode
(
libxml-tree.html#xmlNodePtr
xmlNodePtr
node)
void
#xmlLsOneNode
xmlLsOneNode
(FILE * output,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node)
void
#xmlShell
xmlShell
(
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc,
char * filename,
libxml-debugXML.html#xmlShellReadlineFunc
xmlShellReadlineFunc
input,
FILE * output)
int
#xmlShellBase
xmlShellBase
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
int
#xmlShellCat
xmlShellCat
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Function type:
#xmlShellCmd
xmlShellCmd
int
#xmlShellCmd
xmlShellCmd
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
int
#xmlShellDir
xmlShellDir
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
int
#xmlShellDu
xmlShellDu
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
tree,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
int
#xmlShellList
xmlShellList
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
int
#xmlShellLoad
xmlShellLoad
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * filename,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
void
#xmlShellPrintNode
xmlShellPrintNode
(
libxml-tree.html#xmlNodePtr
xmlNodePtr
node)
void
#xmlShellPrintXPathError
xmlShellPrintXPathError
(int errorType,
const char * arg)
void
#xmlShellPrintXPathResult
xmlShellPrintXPathResult
(
libxml-xpath.html#xmlXPathObjectPtr
xmlXPathObjectPtr
list)
int
#xmlShellPwd
xmlShellPwd
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * buffer,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Function type:
#xmlShellReadlineFunc
xmlShellReadlineFunc
char *
#xmlShellReadlineFunc
xmlShellReadlineFunc
(char * prompt)
int
#xmlShellSave
xmlShellSave
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * filename,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
int
#xmlShellValidate
xmlShellValidate
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * dtd,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
int
#xmlShellWrite
xmlShellWrite
(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * filename,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Description
Structure xmlShellCtxt
Structure xmlShellCtxt
struct _xmlShellCtxt {
char *	filename
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc
libxml-tree.html#xmlNodePtr
xmlNodePtr
node
libxml-xpath.html#xmlXPathContextPtr
xmlXPathContextPtr
pctxt
int	loaded
FILE *	output
libxml-debugXML.html#xmlShellReadlineFunc
xmlShellReadlineFunc
input
}
Function: xmlBoolToText
const char *	xmlBoolToText		(int boolval)
Convenient way to turn bool into text
boolval
:
a bool to turn into text
Returns
:
a pointer to either "True" or "False"
Function: xmlDebugCheckDocument
int	xmlDebugCheckDocument		(FILE * output,
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc)
Check the document for potential content problems, and output the errors to @output
output
:
the FILE * for the output
doc
:
the document
Returns
:
the number of errors found
Function: xmlDebugDumpAttr
void	xmlDebugDumpAttr		(FILE * output,
libxml-tree.html#xmlAttrPtr
xmlAttrPtr
attr,
int depth)
Dumps debug information for the
libxml-SAX.html#attribute
attribute
output
:
the FILE * for the output
attr
:
the
libxml-SAX.html#attribute
attribute
depth
:
the indentation level.
Function: xmlDebugDumpAttrList
void	xmlDebugDumpAttrList		(FILE * output,
libxml-tree.html#xmlAttrPtr
xmlAttrPtr
attr,
int depth)
Dumps debug information for the
libxml-SAX.html#attribute
attribute
list
output
:
the FILE * for the output
attr
:
the
libxml-SAX.html#attribute
attribute
list
depth
:
the indentation level.
Function: xmlDebugDumpDTD
void	xmlDebugDumpDTD			(FILE * output,
libxml-tree.html#xmlDtdPtr
xmlDtdPtr
dtd)
Dumps debug information for the DTD
output
:
the FILE * for the output
dtd
:
the DTD
Function: xmlDebugDumpDocument
void	xmlDebugDumpDocument		(FILE * output,
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc)
Dumps debug information for the document, it's recursive
output
:
the FILE * for the output
doc
:
the document
Function: xmlDebugDumpDocumentHead
void	xmlDebugDumpDocumentHead	(FILE * output,
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc)
Dumps debug information cncerning the document, not recursive
output
:
the FILE * for the output
doc
:
the document
Function: xmlDebugDumpEntities
void	xmlDebugDumpEntities		(FILE * output,
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc)
Dumps debug information for all the entities in use by the document
output
:
the FILE * for the output
doc
:
the document
Function: xmlDebugDumpNode
void	xmlDebugDumpNode		(FILE * output,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
int depth)
Dumps debug information for the element node, it is recursive
output
:
the FILE * for the output
node
:
the node
depth
:
the indentation level.
Function: xmlDebugDumpNodeList
void	xmlDebugDumpNodeList		(FILE * output,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
int depth)
Dumps debug information for the list of element node, it is recursive
output
:
the FILE * for the output
node
:
the node list
depth
:
the indentation level.
Function: xmlDebugDumpOneNode
void	xmlDebugDumpOneNode		(FILE * output,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
int depth)
Dumps debug information for the element node, it is not recursive
output
:
the FILE * for the output
node
:
the node
depth
:
the indentation level.
Function: xmlDebugDumpString
void	xmlDebugDumpString		(FILE * output,
const
libxml-xmlstring.html#xmlChar
xmlChar
* str)
Dumps informations about the string, shorten it if necessary
output
:
the FILE * for the output
str
:
the string
Function: xmlLsCountNode
int	xmlLsCountNode			(
libxml-tree.html#xmlNodePtr
xmlNodePtr
node)
Count the children of @node.
node
:
the node to count
Returns
:
the number of children of @node.
Function: xmlLsOneNode
void	xmlLsOneNode			(FILE * output,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node)
Dump to @output the type and name of @node.
output
:
the FILE * for the output
node
:
the node to dump
Function: xmlShell
void	xmlShell			(
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc,
char * filename,
libxml-debugXML.html#xmlShellReadlineFunc
xmlShellReadlineFunc
input,
FILE * output)
Implements the XML shell This allow to load, validate, view, modify and save a document using a environment similar to a UNIX commandline.
doc
:
the initial document
filename
:
the output buffer
input
:
the line reading function
output
:
the output FILE*, defaults to stdout if NULL
Function: xmlShellBase
int	xmlShellBase			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "base" dumps the current XML base of the node
ctxt
:
the shell context
arg
:
unused
node
:
a node
node2
:
unused
Returns
:
0
Function: xmlShellCat
int	xmlShellCat			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "cat" dumps the serialization node content (XML or HTML).
ctxt
:
the shell context
arg
:
unused
node
:
a node
node2
:
unused
Returns
:
0
Function type: xmlShellCmd
Function type: xmlShellCmd
int	xmlShellCmd			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
This is a generic signature for the XML shell functions.
ctxt
:
a shell context
arg
:
a string argument
node
:
a first node
node2
:
a second node
Returns
:
an int, negative returns indicating errors.
Function: xmlShellDir
int	xmlShellDir			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "dir" dumps informations about the node (namespace, attributes, content).
ctxt
:
the shell context
arg
:
unused
node
:
a node
node2
:
unused
Returns
:
0
Function: xmlShellDu
int	xmlShellDu			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
tree,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "du" show the structure of the subtree under node @tree If @tree is null, the command works on the current node.
ctxt
:
the shell context
arg
:
unused
tree
:
a node defining a subtree
node2
:
unused
Returns
:
0 or -1 in case of error
Function: xmlShellList
int	xmlShellList			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * arg,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "ls" Does an Unix like listing of the given node (like a directory)
ctxt
:
the shell context
arg
:
unused
node
:
a node
node2
:
unused
Returns
:
0
Function: xmlShellLoad
int	xmlShellLoad			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * filename,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "load" loads a new document specified by the filename
ctxt
:
the shell context
filename
:
the file name
node
:
unused
node2
:
unused
Returns
:
0 or -1 if loading failed
Function: xmlShellPrintNode
void	xmlShellPrintNode		(
libxml-tree.html#xmlNodePtr
xmlNodePtr
node)
Print node to the output FILE
node
:
a non-null node to print to the output FILE
Function: xmlShellPrintXPathError
void	xmlShellPrintXPathError		(int errorType,
const char * arg)
Print the xpath error to libxml default error channel
errorType
:
valid xpath error id
arg
:
the argument that cause xpath to fail
Function: xmlShellPrintXPathResult
void	xmlShellPrintXPathResult	(
libxml-xpath.html#xmlXPathObjectPtr
xmlXPathObjectPtr
list)
Prints result to the output FILE
list
:
a valid result generated by an xpath evaluation
Function: xmlShellPwd
int	xmlShellPwd			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * buffer,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "pwd" Show the full path from the root to the node, if needed building thumblers when similar elements exists at a given ancestor level. The output is compatible with XPath commands.
ctxt
:
the shell context
buffer
:
the output buffer
node
:
a node
node2
:
unused
Returns
:
0 or -1 in case of error
Function type: xmlShellReadlineFunc
Function type: xmlShellReadlineFunc
char *	xmlShellReadlineFunc		(char * prompt)
This is a generic signature for the XML shell input function.
prompt
:
a string prompt
Returns
:
a string which will be freed by the Shell.
Function: xmlShellSave
int	xmlShellSave			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * filename,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "save" Write the current document to the filename, or it's original name
ctxt
:
the shell context
filename
:
the file name (optional)
node
:
unused
node2
:
unused
Returns
:
0 or -1 in case of error
Function: xmlShellValidate
int	xmlShellValidate		(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * dtd,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "validate" Validate the document, if a DTD path is provided, then the validation is done against the given DTD.
ctxt
:
the shell context
dtd
:
the DTD URI (optional)
node
:
unused
node2
:
unused
Returns
:
0 or -1 in case of error
Function: xmlShellWrite
int	xmlShellWrite			(
libxml-debugXML.html#xmlShellCtxtPtr
xmlShellCtxtPtr
ctxt,
char * filename,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node2)
Implements the XML shell function "write" Write the current node to the filename, it saves the serialization of the subtree under the @node specified
ctxt
:
the shell context
filename
:
the file name
node
:
a node in the tree
node2
:
unused
Returns
:
0 or -1 in case of error
../bugs.html
Daniel Veillard
