diff --git a/doc/xmlio.html b/doc/xmlio.html index b158f5f1..87af4c2f 100644 --- a/doc/xmlio.html +++ b/doc/xmlio.html @@ -18,7 +18,7 @@ href="http://xmlsoft.org/xmlio.html">http://xmlsoft.org/xmlio.html

Mailing-list archive: http://xmlsoft.org/messages/

-

Version: $Revision:$

+

Version: $Revision: 1.1 $

Table of Content:

    @@ -108,43 +108,40 @@ new output handler with the closing call deactivated:

    1. First define a new I/O ouput allocator where the output don't close the file: -
      xmlOutputBufferPtr 
      -xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
      -    xmlOutputBufferPtr ret;
      -    
      -    if (xmlOutputCallbackInitialized == 0)
      -        xmlRegisterDefaultOutputCallbacks();
      -    
      -    if (file == NULL) return(NULL);
      -
      -
          ret = xmlAllocOutputBuffer(encoder); 
      -    if (ret != NULL) {
      -        ret->context = file;
      -        ret->writecallback = xmlFileWrite;
      -        ret->closecallback = NULL; /* No close callback */
      -    }
      -
      -
          return(ret); 
      +
      xmlOutputBufferPtr
      +xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
      +    xmlOutputBufferPtr ret;
      +    
      +    if (xmlOutputCallbackInitialized == 0)
      +        xmlRegisterDefaultOutputCallbacks();
      +
      +    if (file == NULL) return(NULL);
      +    ret = xmlAllocOutputBuffer(encoder);
      +    if (ret != NULL) {
      +        ret->context = file;
      +        ret->writecallback = xmlFileWrite;
      +        ret->closecallback = NULL;  /* No close callback */
      +    }
      +    return(ret); 
      }
    2. And then use it to save the document:
      FILE *f;
      -xmlOutputBufferPtr output;
      -
      xmlDocPtr doc;
      +xmlOutputBufferPtr output;
      +xmlDocPtr doc;
       int res;
      -
      + f = ... doc = .... -output = xmlOutputBufferCreateOwn(f, NULL); -
      -res = xmlSaveFileTo(output, doc, NULL); +output = xmlOutputBufferCreateOwn(f, NULL); +res = xmlSaveFileTo(output, doc, NULL);

    Daniel Veillard

    -

    $Id$

    +

    $Id: xmlio.html,v 1.1 2000/08/31 13:50:12 veillard Exp $