List Info

Thread: xmlSaveToFd problem




xmlSaveToFd problem
user name
2006-12-08 17:01:34

Hello,

 

I am very confused on now to use the part of the LIBXML library that involves the functions, xmlSaveToFd and xmlSaveDoc.

 

First of all I don’t see how to use the xmlSave.h file within my code. ; When I include it I get a compiler error that the structure _xmlSaveCtxt is not defined.  I find the definition of this in the xmlSave.c file.  This file includes the xmlSave.h file, but before the declaration of _xmlSaveCtxt. ; So how does anything compile.

 

Also I don’t understand the workflow here, assuming I can get the compile issues resolved.  It seems that you call xmlSaveToFd first to setup your save context, then you call xmlSaveDoc or xmlSaveTree to actually save your XML to a file. ; Am I right here or am I lost in the weeds?

 

Bart

Bart.torbertihsenergy.com

xmlSaveToFd problem
user name
2006-12-08 17:28:56
On Fri, Dec 08, 2006 at 10:01:34AM -0700, Torbert, Barton
wrote:
  Hello,

> First of all I don't see how to use the xmlSave.h file
within my code.

  there is no xmlSave.h, but xmlsave.h

> When I include it I get a compiler error that the
structure _xmlSaveCtxt
> is not defined.

  Either your compiler is buggy or you tried to dereference
a pointer to the
structure. You can't.

> I find the definition of this in the xmlSave.c file.
> This file includes the xmlSave.h file, but before the
declaration of
> _xmlSaveCtxt.  So how does anything compile.

  Any normal C compiler can use pointer to undefined structs

> Also I don't understand the workflow here, assuming I
can get the

  ctxt = xmlSaveToFd(...)
  xmlSaveDoc(ctxt, doc);
  xmlSaveClose(ctxt);
  
Daniel

-- 
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )