debugXML

Name

debugXML -- 

Synopsis



void        xmlDebugDumpString              (FILE *output,
                                             const xmlChar *str);
void        xmlDebugDumpAttr                (FILE *output,
                                             xmlAttrPtr attr,
                                             int depth);
void        xmlDebugDumpAttrList            (FILE *output,
                                             xmlAttrPtr attr,
                                             int depth);
void        xmlDebugDumpOneNode             (FILE *output,
                                             xmlNodePtr node,
                                             int depth);
void        xmlDebugDumpNode                (FILE *output,
                                             xmlNodePtr node,
                                             int depth);
void        xmlDebugDumpNodeList            (FILE *output,
                                             xmlNodePtr node,
                                             int depth);
void        xmlDebugDumpDocumentHead        (FILE *output,
                                             xmlDocPtr doc);
void        xmlDebugDumpDocument            (FILE *output,
                                             xmlDocPtr doc);
void        xmlDebugDumpDTD                 (FILE *output,
                                             xmlDtdPtr dtd);
void        xmlDebugDumpEntities            (FILE *output,
                                             xmlDocPtr doc);
void        xmlLsOneNode                    (FILE *output,
                                             xmlNodePtr node);
int         xmlLsCountNode                  (xmlNodePtr node);
char*       (*xmlShellReadlineFunc)         (char *prompt);
struct      xmlShellCtxt;
typedef     xmlShellCtxtPtr;
int         (*xmlShellCmd)                  (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
void        xmlShellPrintXPathError         (int errorType,
                                             const char *arg);
void        xmlShellPrintNode               (xmlNodePtr node);
void        xmlShellPrintXPathResult        (xmlXPathObjectPtr list);
int         xmlShellList                    (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
int         xmlShellBase                    (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
int         xmlShellDir                     (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
int         xmlShellCat                     (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
int         xmlShellLoad                    (xmlShellCtxtPtr ctxt,
                                             char *filename,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
int         xmlShellWrite                   (xmlShellCtxtPtr ctxt,
                                             char *filename,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
int         xmlShellSave                    (xmlShellCtxtPtr ctxt,
                                             char *filename,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
int         xmlShellValidate                (xmlShellCtxtPtr ctxt,
                                             char *dtd,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
int         xmlShellDu                      (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr tree,
                                             xmlNodePtr node2);
int         xmlShellPwd                     (xmlShellCtxtPtr ctxt,
                                             char *buffer,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);
void        xmlShell                        (xmlDocPtr doc,
                                             char *filename,
                                             xmlShellReadlineFunc input,
                                             FILE *output);

Description

Details

xmlDebugDumpString ()

void        xmlDebugDumpString              (FILE *output,
                                             const xmlChar *str);

Dumps informations about the string, shorten it if necessary


xmlDebugDumpAttr ()

void        xmlDebugDumpAttr                (FILE *output,
                                             xmlAttrPtr attr,
                                             int depth);

Dumps debug information for the attribute


xmlDebugDumpAttrList ()

void        xmlDebugDumpAttrList            (FILE *output,
                                             xmlAttrPtr attr,
                                             int depth);

Dumps debug information for the attribute list


xmlDebugDumpOneNode ()

void        xmlDebugDumpOneNode             (FILE *output,
                                             xmlNodePtr node,
                                             int depth);

Dumps debug information for the element node, it is not recursive


xmlDebugDumpNode ()

void        xmlDebugDumpNode                (FILE *output,
                                             xmlNodePtr node,
                                             int depth);

Dumps debug information for the element node, it is recursive


xmlDebugDumpNodeList ()

void        xmlDebugDumpNodeList            (FILE *output,
                                             xmlNodePtr node,
                                             int depth);

Dumps debug information for the list of element node, it is recursive


xmlDebugDumpDocumentHead ()

void        xmlDebugDumpDocumentHead        (FILE *output,
                                             xmlDocPtr doc);

Dumps debug information cncerning the document, not recursive


xmlDebugDumpDocument ()

void        xmlDebugDumpDocument            (FILE *output,
                                             xmlDocPtr doc);

Dumps debug information for the document, it's recursive


xmlDebugDumpDTD ()

void        xmlDebugDumpDTD                 (FILE *output,
                                             xmlDtdPtr dtd);

Dumps debug information for the DTD


xmlDebugDumpEntities ()

void        xmlDebugDumpEntities            (FILE *output,
                                             xmlDocPtr doc);

Dumps debug information for all the entities in use by the document


xmlLsOneNode ()

void        xmlLsOneNode                    (FILE *output,
                                             xmlNodePtr node);

Dump to output the type and name of node.


xmlLsCountNode ()

int         xmlLsCountNode                  (xmlNodePtr node);

Count the children of node.


xmlShellReadlineFunc ()

char*       (*xmlShellReadlineFunc)         (char *prompt);

This is a generic signature for the XML shell input function.


struct xmlShellCtxt

struct xmlShellCtxt {
    char *filename;
    xmlDocPtr doc;
    xmlNodePtr node;
    xmlXPathContextPtr pctxt;
    int loaded;
    FILE *output;
    xmlShellReadlineFunc input;
};

A debugging shell context. TODO: add the defined function tables.


xmlShellCtxtPtr

typedef xmlShellCtxt *xmlShellCtxtPtr;


xmlShellCmd ()

int         (*xmlShellCmd)                  (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);

This is a generic signature for the XML shell functions.


xmlShellPrintXPathError ()

void        xmlShellPrintXPathError         (int errorType,
                                             const char *arg);

Print the xpath error to libxml default error channel


xmlShellPrintNode ()

void        xmlShellPrintNode               (xmlNodePtr node);

Print node to stdout


xmlShellPrintXPathResult ()

void        xmlShellPrintXPathResult        (xmlXPathObjectPtr list);

Prints result to stdout


xmlShellList ()

int         xmlShellList                    (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);

Implements the XML shell function "ls" Does an Unix like listing of the given node (like a directory)


xmlShellBase ()

int         xmlShellBase                    (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);

Implements the XML shell function "base" dumps the current XML base of the node


xmlShellDir ()

int         xmlShellDir                     (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);

Implements the XML shell function "dir" dumps informations about the node (namespace, attributes, content).


xmlShellCat ()

int         xmlShellCat                     (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);

Implements the XML shell function "cat" dumps the serialization node content (XML or HTML).


xmlShellLoad ()

int         xmlShellLoad                    (xmlShellCtxtPtr ctxt,
                                             char *filename,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);

Implements the XML shell function "load" loads a new document specified by the filename


xmlShellWrite ()

int         xmlShellWrite                   (xmlShellCtxtPtr ctxt,
                                             char *filename,
                                             xmlNodePtr node,
                                             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


xmlShellSave ()

int         xmlShellSave                    (xmlShellCtxtPtr ctxt,
                                             char *filename,
                                             xmlNodePtr node,
                                             xmlNodePtr node2);

Implements the XML shell function "save" Write the current document to the filename, or it's original name


xmlShellValidate ()

int         xmlShellValidate                (xmlShellCtxtPtr ctxt,
                                             char *dtd,
                                             xmlNodePtr node,
                                             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.


xmlShellDu ()

int         xmlShellDu                      (xmlShellCtxtPtr ctxt,
                                             char *arg,
                                             xmlNodePtr tree,
                                             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.


xmlShellPwd ()

int         xmlShellPwd                     (xmlShellCtxtPtr ctxt,
                                             char *buffer,
                                             xmlNodePtr node,
                                             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.


xmlShell ()

void        xmlShell                        (xmlDocPtr doc,
                                             char *filename,
                                             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.