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

Re: [xml] xmlShell usage on non-stdout



On Tue, Oct 08, 2002 at 04:02:40PM -0600, Vakoc, Mark wrote:
> xmlShellPrintNodeCtxt(ctxt,node) has something like
> 
> if (!ctxt || !node)
>   return 0;
> 
> which was from my mods -- your method needs to handle a NULL ctxt, so
> something like
> 
> xmlShellPrintNodeCtxt(ctxt,node)
> {
>   FILE *fp;
>   if (!node)
>      return 0;
>   if (!ctxt)
>     fp = stdout;
>   else
>     fp = ctxt->output;
> 
>   fprintf(fp,"print something");
> }
> 

  Okay, done !

> I'm also going to add xmlShellUser() and xmlShellReadLineUser() that handle
> passing in a void* ptr on the call to xmlShell() and is made available in
> the xmlShellReadLineUser function.  For my application I need to be able to
> give the ReadLine function some context of where to read from -- it's
> multi-threaded/multi-windowed.

  I hope you're aware of the limitations of xmlShell ? I remember someone
being frustrated because some of the strings could get truncated in the
output. It's really intended for human consumption ATM.

Daniel

-- 
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/



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