Re: [xml] patch for adding "shell" scripting
- From: Daniel Veillard <veillard redhat com>
- To: Nic <nferrier tapsellferrier co uk>
- Cc: xml gnome org
- Subject: Re: [xml] patch for adding "shell" scripting
- Date: Fri, 5 Sep 2003 06:54:10 -0400
On Fri, Sep 05, 2003 at 11:25:52AM +0100, Nic wrote:
The xmlShell is a really cool feature. I was using my guile libxmlxsl
module for navigating doms but now I've discovered the xmlShell I
don't need to.
Another thing I use my guile code is for scripting small xpath
extractions from xml documents. xmllint won't currently run a script
from the command line.
I like the idea, but please rewitre the patch for portability.
I'd be interested in adding getopt support to xmllint if it was going
to be accepted.
No, it's a portability nightmare...
+ char* scriptLine = strdup(strsep (&cmdLineScript, ";"));
please reuse the xmlStrdup and xmlStrchr functions to not
rely on strdup and strsep.
+ if (scriptLine != NULL)
+ if (strlen(scriptLine) < 1)
idem better use xmlStrlen()
It would be good to make sure all string allocated or copied
are cleaned up with xmlFree() on exit too.
So good idea, but the code need some cleanup :-)
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
] [Thread Prev