[xml] patch for xmllint shell help command



hi,

attached is a patch against debugXML.c of libxml2-2.4.9 in unidiff format, which adds a help command to the 
xmllint shell.

Stefan
--
      \|/
     <@ @> Stefan Kost  private                   business
+-oOO-(_)-OOo------------------------------------------------------------- - - -  -   -
|        __    Address  Zwenkauer Str. 24         HTWK Leipzig, Fb IMN, Postfach 300066
|       ///             04277 Leipzig             04277 Leipzig
|  __  ///              Germany                   Germany
|  \\\///      Phone    +49341 3910483            +49341 3076101
|   \__/       EMail    st_kost gmx net           kost imn htwk-leipzig de
|              WWW      http://www.sonicpulse.de  http://www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - -  -    -
--- debugXML.c.old      Thu Nov  8 14:36:39 2001
+++ debugXML.c  Thu Nov  8 14:06:33 2001
@@ -1987,7 +1987,24 @@
             break;
         if (!strcmp(command, "bye"))
             break;
-        if (!strcmp(command, "validate")) {
+               if (!strcmp(command, "help")) {
+                 printf("\tbase         display XML base of the node\n");
+                 printf("\tbye          leave shell\n");
+                 printf("\tcat [node]   display node or current node\n");
+                 printf("\tcd [path]    change directory to path or to root\n");
+                 printf("\tdir [path]   dumps informations about the node (namespace, attributes, 
content)\n");
+                 printf("\tdu [path]    show the structure of the subtree under path or the current node\n");
+                 printf("\texit         leave shell\n");
+                 printf("\thelp         display this help\n");
+                 printf("\tfree         display memory usage\n");
+                 printf("\tload [name]  load a new document with name\n");
+                 printf("\tls [path]    list contents of path or the current directory\n");
+                 printf("\tpwd          display current working directory\n");
+                 printf("\tquit         leave shell\n");
+                 printf("\tsave [name]  save this document to name or the original name\n");
+                 printf("\tvalidate     check the document for errors\n");
+                 printf("\twrite [name] write the current node to the filename\n");
+        } else if (!strcmp(command, "validate")) {
             xmlShellValidate(ctxt, arg, NULL, NULL);
         } else if (!strcmp(command, "load")) {
             xmlShellLoad(ctxt, arg, NULL, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]