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

  FILE *fp;
  if (!node)
     return 0;
  if (!ctxt)
    fp = stdout;
    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

  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 Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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