Checked:
--- debugXML.c.old      2010-03-21 10:13:06.000000000 +0100
+++ debugXML.c  2010-03-21 09:47:23.000000000 +0100
@@ -2941,7 +2941,7 @@
                xmlGenericError(xmlGenericErrorContext,
                         "Write command requires a filename
argument\n"); else
-               xmlShellWrite(ctxt, arg, NULL, NULL);
+               xmlShellWrite(ctxt, arg, ctxt->node, NULL);
 #endif /* LIBXML_OUTPUT_ENABLED */
         } else if (!strcmp(command, "grep")) {
             xmlShellGrep(ctxt, arg, ctxt->node, NULL);

On Wed, 10 Mar 2010 21:10:01 +0100
el barto <[email protected]> wrote:

> Hello,
> May be I am wrong but the 'write' command of the shell seems not to
> work because the 'node' parameter is always NULL:
> int
> xmlShellWrite(xmlShellCtxtPtr ctxt, char *filename, xmlNodePtr node,
>               xmlNodePtr node2 ATTRIBUTE_UNUSED)
> {
>     if (node == NULL)
>         return (-1);
> // ...
> 
>           if ((arg == NULL) || (arg[0] == 0))
>               xmlGenericError(xmlGenericErrorContext,
>                         "Write command requires a filename
> argument\n"); else
>               xmlShellWrite(ctxt, arg, NULL, NULL);
> 
> May be 'ctx->node' should be used.
> Many thanks for this great tool.
> _______________________________________________
> xml mailing list, project page  http://xmlsoft.org/
> [email protected]
> http://mail.gnome.org/mailman/listinfo/xml
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to