Blame doc/devhelp/libxml2-xmlIO.html

Packit 423ecb
Packit 423ecb
<html>
Packit 423ecb
  <head>
Packit 423ecb
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
Packit 423ecb
    <title>xmlIO: interface for the I/O interfaces used by the parser</title>
Packit 423ecb
    <meta name="generator" content="Libxml2 devhelp stylesheet"/>
Packit 423ecb
    <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
Packit 423ecb
    <link rel="up" href="general.html" title="API"/>
Packit 423ecb
    <link rel="stylesheet" href="style.css" type="text/css"/>
Packit 423ecb
    <link rel="chapter" href="general.html" title="API"/>
Packit 423ecb
  </head>
Packit 423ecb
  <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 423ecb
    
Packit 423ecb
      
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Prev
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Up
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Home
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Next
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        libxml2 Reference Manual
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
    

Packit 423ecb
      xmlIO
Packit 423ecb
    
Packit 423ecb
    

xmlIO - interface for the I/O interfaces used by the parser

Packit 423ecb
    

interface for the I/O interfaces used by the parser

Packit 423ecb
    

Author(s): Daniel Veillard

Packit 423ecb
    
Packit 423ecb
      

Synopsis

Packit 423ecb
      
int	xmlIOHTTPRead			(void * context, 
char * buffer,
int len);
Packit 423ecb
typedef int xmlInputMatchCallback		(char const * filename);
Packit 423ecb
void	xmlRegisterDefaultOutputCallbacks	(void);
Packit 423ecb
int	xmlFileClose			(void * context);
Packit 423ecb
typedef int xmlOutputMatchCallback		(char const * filename);
Packit 423ecb
int	xmlParserInputBufferPush	(xmlParserInputBufferPtr in, 
int len,
const char * buf);
Packit 423ecb
int	xmlIOFTPRead			(void * context, 
char * buffer,
int len);
Packit 423ecb
void	xmlRegisterHTTPPostCallbacks	(void);
Packit 423ecb
void *	xmlIOFTPOpen			(const char * filename);
Packit 423ecb
int	xmlIOFTPClose			(void * context);
Packit 423ecb
void *	xmlFileOpen			(const char * filename);
Packit 423ecb
xmlOutputBufferPtr	xmlOutputBufferCreateFile	(FILE * file, 
xmlCharEncodingHandlerPtr encoder);
Packit 423ecb
int	xmlCheckFilename		(const char * path);
Packit 423ecb
typedef void * xmlOutputOpenCallback		(char const * filename);
Packit 423ecb
xmlParserInputBufferPtr	xmlParserInputBufferCreateFilename	(const char * URI, 
xmlCharEncoding enc);
Packit 423ecb
int	xmlOutputBufferClose		(xmlOutputBufferPtr out);
Packit 423ecb
xmlParserInputBufferPtr	xmlAllocParserInputBuffer	(xmlCharEncoding enc);
Packit 423ecb
xmlOutputBufferPtr	xmlOutputBufferCreateIO	(xmlOutputWriteCallback iowrite, 
xmlOutputCloseCallback ioclose,
void * ioctx,
xmlCharEncodingHandlerPtr encoder);
Packit 423ecb
typedef int xmlOutputWriteCallback		(void * context, 
const char * buffer,
int len);
Packit 423ecb
int	xmlOutputBufferFlush		(xmlOutputBufferPtr out);
Packit 423ecb
xmlParserInputPtr	xmlCheckHTTPInput	(xmlParserCtxtPtr ctxt, 
xmlParserInputPtr ret);
Packit 423ecb
int	xmlRegisterOutputCallbacks	(xmlOutputMatchCallback matchFunc, 
xmlOutputOpenCallback openFunc,
xmlOutputWriteCallback writeFunc,
xmlOutputCloseCallback closeFunc);
Packit 423ecb
xmlParserInputBufferPtr	xmlParserInputBufferCreateMem	(const char * mem, 
int size,
xmlCharEncoding enc);
Packit 423ecb
int	xmlIOFTPMatch			(const char * filename);
Packit 423ecb
int	xmlRegisterInputCallbacks	(xmlInputMatchCallback matchFunc, 
xmlInputOpenCallback openFunc,
xmlInputReadCallback readFunc,
xmlInputCloseCallback closeFunc);
Packit 423ecb
void	xmlFreeParserInputBuffer	(xmlParserInputBufferPtr in);
Packit 423ecb
void	xmlRegisterDefaultInputCallbacks	(void);
Packit 423ecb
int	xmlParserInputBufferGrow	(xmlParserInputBufferPtr in, 
int len);
Packit 423ecb
typedef int xmlOutputCloseCallback		(void * context);
Packit 423ecb
xmlOutputBufferPtr	xmlAllocOutputBuffer	(xmlCharEncodingHandlerPtr encoder);
Packit 423ecb
xmlParserInputPtr	xmlNoNetExternalEntityLoader	(const char * URL, 
const char * ID,
xmlParserCtxtPtr ctxt);
Packit 423ecb
xmlOutputBufferPtr	xmlOutputBufferCreateBuffer	(xmlBufferPtr buffer, 
xmlCharEncodingHandlerPtr encoder);
Packit 423ecb
int	xmlIOHTTPMatch			(const char * filename);
Packit 423ecb
void *	xmlIOHTTPOpen			(const char * filename);
Packit 423ecb
xmlParserInputBufferPtr	xmlParserInputBufferCreateIO	(xmlInputReadCallback ioread, 
xmlInputCloseCallback ioclose,
void * ioctx,
xmlCharEncoding enc);
Packit 423ecb
xmlOutputBufferPtr	xmlOutputBufferCreateFd	(int fd, 
xmlCharEncodingHandlerPtr encoder);
Packit 423ecb
xmlChar *	xmlNormalizeWindowsPath	(const xmlChar * path);
Packit 423ecb
typedef int xmlInputReadCallback		(void * context, 
char * buffer,
int len);
Packit 423ecb
xmlParserInputBufferPtr	xmlParserInputBufferCreateStatic	(const char * mem, 
int size,
xmlCharEncoding enc);
Packit 423ecb
const xmlChar *	xmlOutputBufferGetContent	(xmlOutputBufferPtr out);
Packit 423ecb
int	xmlIOHTTPClose			(void * context);
Packit 423ecb
int	xmlOutputBufferWriteEscape	(xmlOutputBufferPtr out, 
const xmlChar * str,
xmlCharEncodingOutputFunc escaping);
Packit 423ecb
xmlOutputBufferPtr	xmlOutputBufferCreateFilename	(const char * URI, 
xmlCharEncodingHandlerPtr encoder,
int compression);
Packit 423ecb
size_t	xmlOutputBufferGetSize		(xmlOutputBufferPtr out);
Packit 423ecb
void	xmlCleanupOutputCallbacks	(void);
Packit 423ecb
typedef void * xmlInputOpenCallback		(char const * filename);
Packit 423ecb
int	xmlParserInputBufferRead	(xmlParserInputBufferPtr in, 
int len);
Packit 423ecb
int	xmlOutputBufferWriteString	(xmlOutputBufferPtr out, 
const char * str);
Packit 423ecb
int	xmlFileMatch			(const char * filename);
Packit 423ecb
int	xmlPopInputCallbacks		(void);
Packit 423ecb
int	xmlFileRead			(void * context, 
char * buffer,
int len);
Packit 423ecb
xmlParserInputBufferPtr	xmlParserInputBufferCreateFile	(FILE * file, 
xmlCharEncoding enc);
Packit 423ecb
char *	xmlParserGetDirectory		(const char * filename);
Packit 423ecb
int	xmlOutputBufferWrite		(xmlOutputBufferPtr out, 
int len,
const char * buf);
Packit 423ecb
void	xmlCleanupInputCallbacks	(void);
Packit 423ecb
typedef int xmlInputCloseCallback		(void * context);
Packit 423ecb
void *	xmlIOHTTPOpenW			(const char * post_uri, 
int compression);
Packit 423ecb
xmlParserInputBufferPtr	xmlParserInputBufferCreateFd	(int fd, 
xmlCharEncoding enc);
Packit 423ecb
Packit 423ecb
    
Packit 423ecb
    
Packit 423ecb
      

Description

Packit 423ecb
    
Packit 423ecb
    
Packit 423ecb
      

Details

Packit 423ecb
      
Packit 423ecb
        
Packit 423ecb

Callback used in the I/O Input API to close the resource

Packit 423ecb
<tt>context</tt>:an Input context
<tt>Returns</tt>:0 or -1 in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback used in the I/O Input API to detect if the current handler can provide input fonctionnalities for this resource.

Packit 423ecb
<tt>filename</tt>:the filename or URI
<tt>Returns</tt>:1 if yes and 0 if another Input module should be used
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback used in the I/O Input API to open the resource

Packit 423ecb
<tt>filename</tt>:the filename or URI
<tt>Returns</tt>:an Input context or NULL in case or error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback used in the I/O Input API to read the resource

Packit 423ecb
<tt>context</tt>:an Input context
<tt>buffer</tt>:the buffer to store data read
<tt>len</tt>:the length of the buffer in bytes
<tt>Returns</tt>:the number of bytes read or -1 in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback used in the I/O Output API to close the resource

Packit 423ecb
<tt>context</tt>:an Output context
<tt>Returns</tt>:0 or -1 in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback used in the I/O Output API to detect if the current handler can provide output fonctionnalities for this resource.

Packit 423ecb
<tt>filename</tt>:the filename or URI
<tt>Returns</tt>:1 if yes and 0 if another Output module should be used
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback used in the I/O Output API to open the resource

Packit 423ecb
<tt>filename</tt>:the filename or URI
<tt>Returns</tt>:an Output context or NULL in case or error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Callback used in the I/O Output API to write to the resource

Packit 423ecb
<tt>context</tt>:an Output context
<tt>buffer</tt>:the buffer of data to write
<tt>len</tt>:the length of the buffer in bytes
<tt>Returns</tt>:the number of bytes written or -1 in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Create a buffered parser output

Packit 423ecb
<tt>encoder</tt>:the encoding converter or NULL
<tt>Returns</tt>:the new parser output or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Create a buffered parser input for progressive parsing

Packit 423ecb
<tt>enc</tt>:the charset encoding if known
<tt>Returns</tt>:the new parser input or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

function checks to see if @path is a valid source (file, socket...) for XML. if stat is not available on the target machine,

Packit 423ecb
<tt>path</tt>:the path to check
<tt>Returns</tt>:1. if stat fails, returns 0 (if calling stat on the filename fails, it can't be right). if stat succeeds and the file is a directory, returns 2. otherwise returns 1.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Check an input in case it was created from an HTTP stream, in that case it will handle encoding and update of the base URL in case of redirection. It also checks for HTTP errors in which case the input is cleanly freed up and an appropriate error is raised in context

Packit 423ecb
<tt>ctxt</tt>:an XML parser context
<tt>ret</tt>:an XML parser input
<tt>Returns</tt>:the input or NULL in case of HTTP error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

clears the entire input callback table. this includes the compiled-in I/O.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

clears the entire output callback table. this includes the compiled-in I/O callbacks.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Close an I/O channel

Packit 423ecb
<tt>context</tt>:the I/O context
<tt>Returns</tt>:0 or -1 in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

input from FILE *

Packit 423ecb
<tt>filename</tt>:the URI for matching
<tt>Returns</tt>:1 if matches, 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Wrapper around xmlFileOpen_real that try it with an unescaped version of @filename, if this fails fallback to @filename

Packit 423ecb
<tt>filename</tt>:the URI for matching
<tt>Returns</tt>:a handler or NULL in case or failure
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Read @len bytes to @buffer from the I/O channel.

Packit 423ecb
<tt>context</tt>:the I/O context
<tt>buffer</tt>:where to drop data
<tt>len</tt>:number of bytes to write
<tt>Returns</tt>:the number of bytes written or < 0 in case of failure
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Free up the memory used by a buffered parser input

Packit 423ecb
<tt>in</tt>:a buffered parser input
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Close an FTP I/O channel

Packit 423ecb
<tt>context</tt>:the I/O context
<tt>Returns</tt>:0
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

check if the URI matches an FTP one

Packit 423ecb
<tt>filename</tt>:the URI for matching
<tt>Returns</tt>:1 if matches, 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

open an FTP I/O channel

Packit 423ecb
<tt>filename</tt>:the URI for matching
<tt>Returns</tt>:an I/O context or NULL in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Read @len bytes to @buffer from the I/O channel.

Packit 423ecb
<tt>context</tt>:the I/O context
<tt>buffer</tt>:where to drop data
<tt>len</tt>:number of bytes to write
<tt>Returns</tt>:the number of bytes written
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Close an HTTP I/O channel

Packit 423ecb
<tt>context</tt>:the I/O context
<tt>Returns</tt>:0
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

check if the URI matches an HTTP one

Packit 423ecb
<tt>filename</tt>:the URI for matching
<tt>Returns</tt>:1 if matches, 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

open an HTTP I/O channel

Packit 423ecb
<tt>filename</tt>:the URI for matching
<tt>Returns</tt>:an I/O context or NULL in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Open a temporary buffer to collect the document for a subsequent HTTP POST request. Non-static as is called from the output buffer creation routine.

Packit 423ecb
<tt>post_uri</tt>:The destination URI for the document
<tt>compression</tt>:The compression desired for the document.
<tt>Returns</tt>:an I/O context or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Read @len bytes to @buffer from the I/O channel.

Packit 423ecb
<tt>context</tt>:the I/O context
<tt>buffer</tt>:where to drop data
<tt>len</tt>:number of bytes to write
<tt>Returns</tt>:the number of bytes written
Packit 423ecb
        
Packit 423ecb
        

xmlNoNetExternalEntityLoader ()

xmlParserInputPtr	xmlNoNetExternalEntityLoader	(const char * URL, 
const char * ID,
xmlParserCtxtPtr ctxt)
Packit 423ecb

A specific entity loader disabling network accesses, though still allowing local catalog accesses for resolution.

Packit 423ecb
<tt>URL</tt>:the URL for the entity to load
<tt>ID</tt>:the System ID for the entity to load
<tt>ctxt</tt>:the context in which the entity is called or NULL
<tt>Returns</tt>:a new allocated xmlParserInputPtr, or NULL.
Packit 423ecb
        
Packit 423ecb
        

xmlNormalizeWindowsPath ()

xmlChar *	xmlNormalizeWindowsPath	(const xmlChar * path)
Packit 423ecb

This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution.

Packit 423ecb
<tt>path</tt>:the input file path
<tt>Returns</tt>:a canonicalized version of the path
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

flushes and close the output I/O channel and free up all the associated resources

Packit 423ecb
<tt>out</tt>:a buffered output
<tt>Returns</tt>:the number of byte written or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Create a buffered output for the progressive saving to a xmlBuffer

Packit 423ecb
<tt>buffer</tt>:a xmlBufferPtr
<tt>encoder</tt>:the encoding converter or NULL
<tt>Returns</tt>:the new parser output or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Create a buffered output for the progressive saving to a file descriptor

Packit 423ecb
<tt>fd</tt>:a file descriptor number
<tt>encoder</tt>:the encoding converter or NULL
<tt>Returns</tt>:the new parser output or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlOutputBufferCreateFile ()

xmlOutputBufferPtr	xmlOutputBufferCreateFile	(FILE * file, 
xmlCharEncodingHandlerPtr encoder)
Packit 423ecb

Create a buffered output for the progressive saving to a FILE * buffered C I/O

Packit 423ecb
<tt>file</tt>:a FILE*
<tt>encoder</tt>:the encoding converter or NULL
<tt>Returns</tt>:the new parser output or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlOutputBufferCreateFilename ()

xmlOutputBufferPtr	xmlOutputBufferCreateFilename	(const char * URI, 
xmlCharEncodingHandlerPtr encoder,
int compression)
Packit 423ecb

Create a buffered output for the progressive saving of a file If filename is "-' then we use stdout as the output. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. TODO: currently if compression is set, the library only support writing to a local file.

Packit 423ecb
<tt>URI</tt>:a C string containing the URI or filename
<tt>encoder</tt>:the encoding converter or NULL
<tt>compression</tt>:the compression ration (0 none, 9 max).
<tt>Returns</tt>:the new output or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Create a buffered output for the progressive saving to an I/O handler

Packit 423ecb
<tt>iowrite</tt>:an I/O write function
<tt>ioclose</tt>:an I/O close function
<tt>ioctx</tt>:an I/O handler
<tt>encoder</tt>:the charset encoding if known
<tt>Returns</tt>:the new parser output or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

flushes the output I/O channel

Packit 423ecb
<tt>out</tt>:a buffered output
<tt>Returns</tt>:the number of byte written or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Gives a pointer to the data currently held in the output buffer

Packit 423ecb
<tt>out</tt>:an xmlOutputBufferPtr
<tt>Returns</tt>:a pointer to the data or NULL in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Gives the length of the data currently held in the output buffer

Packit 423ecb
<tt>out</tt>:an xmlOutputBufferPtr
<tt>Returns</tt>:0 in case or error or no data is held, the size otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.

Packit 423ecb
<tt>out</tt>:a buffered parser output
<tt>len</tt>:the size in bytes of the array.
<tt>buf</tt>:an char array
<tt>Returns</tt>:the number of chars immediately written, or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Write the content of the string in the output I/O buffer This routine escapes the caracters and then handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.

Packit 423ecb
<tt>out</tt>:a buffered parser output
<tt>str</tt>:a zero terminated UTF-8 string
<tt>escaping</tt>:an optional escaping function (or NULL)
<tt>Returns</tt>:the number of chars immediately written, or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Write the content of the string in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.

Packit 423ecb
<tt>out</tt>:a buffered parser output
<tt>str</tt>:a zero terminated C string
<tt>Returns</tt>:the number of chars immediately written, or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

lookup the directory for that file

Packit 423ecb
<tt>filename</tt>:the path to a file
<tt>Returns</tt>:a new allocated string containing the directory, or NULL.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Create a buffered parser input for the progressive parsing for the input from a file descriptor

Packit 423ecb
<tt>fd</tt>:a file descriptor number
<tt>enc</tt>:the charset encoding if known
<tt>Returns</tt>:the new parser input or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlParserInputBufferCreateFile ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateFile	(FILE * file, 
xmlCharEncoding enc)
Packit 423ecb

Create a buffered parser input for the progressive parsing of a FILE * buffered C I/O

Packit 423ecb
<tt>file</tt>:a FILE*
<tt>enc</tt>:the charset encoding if known
<tt>Returns</tt>:the new parser input or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlParserInputBufferCreateFilename ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateFilename	(const char * URI, 
xmlCharEncoding enc)
Packit 423ecb

Create a buffered parser input for the progressive parsing of a file If filename is "-' then we use stdin as the input. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Do an encoding check if enc == XML_CHAR_ENCODING_NONE

Packit 423ecb
<tt>URI</tt>:a C string containing the URI or filename
<tt>enc</tt>:the charset encoding if known
<tt>Returns</tt>:the new parser input or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Create a buffered parser input for the progressive parsing for the input from an I/O handler

Packit 423ecb
<tt>ioread</tt>:an I/O read function
<tt>ioclose</tt>:an I/O close function
<tt>ioctx</tt>:an I/O handler
<tt>enc</tt>:the charset encoding if known
<tt>Returns</tt>:the new parser input or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlParserInputBufferCreateMem ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateMem	(const char * mem, 
int size,
xmlCharEncoding enc)
Packit 423ecb

Create a buffered parser input for the progressive parsing for the input from a memory area.

Packit 423ecb
<tt>mem</tt>:the memory input
<tt>size</tt>:the length of the memory block
<tt>enc</tt>:the charset encoding if known
<tt>Returns</tt>:the new parser input or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlParserInputBufferCreateStatic ()

xmlParserInputBufferPtr	xmlParserInputBufferCreateStatic	(const char * mem, 
int size,
xmlCharEncoding enc)
Packit 423ecb

Create a buffered parser input for the progressive parsing for the input from an immutable memory area. This will not copy the memory area to the buffer, but the memory is expected to be available until the end of the parsing, this is useful for example when using mmap'ed file.

Packit 423ecb
<tt>mem</tt>:the memory input
<tt>size</tt>:the length of the memory block
<tt>enc</tt>:the charset encoding if known
<tt>Returns</tt>:the new parser input or NULL
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy by copying directly onto in->buffer or in->raw

Packit 423ecb
<tt>in</tt>:a buffered parser input
<tt>len</tt>:indicative value of the amount of chars to read
<tt>Returns</tt>:the number of chars read and stored in the buffer, or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Push the content of the arry in the input buffer This routine handle the I18N transcoding to internal UTF-8 This is used when operating the parser in progressive (push) mode.

Packit 423ecb
<tt>in</tt>:a buffered parser input
<tt>len</tt>:the size in bytes of the array.
<tt>buf</tt>:an char array
<tt>Returns</tt>:the number of chars read and stored in the buffer, or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Refresh the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8

Packit 423ecb
<tt>in</tt>:a buffered parser input
<tt>len</tt>:indicative value of the amount of chars to read
<tt>Returns</tt>:the number of chars read and stored in the buffer, or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Clear the top input callback from the input stack. this includes the compiled-in I/O.

Packit 423ecb
<tt>Returns</tt>:the number of input callback registered or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Registers the default compiled-in I/O handlers.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Registers the default compiled-in I/O handlers.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

By default, libxml submits HTTP output requests using the "PUT" method. Calling this method changes the HTTP output method to use the "POST" method instead.

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Register a new set of I/O callback for handling parser input.

Packit 423ecb
<tt>matchFunc</tt>:the xmlInputMatchCallback
<tt>openFunc</tt>:the xmlInputOpenCallback
<tt>readFunc</tt>:the xmlInputReadCallback
<tt>closeFunc</tt>:the xmlInputCloseCallback
<tt>Returns</tt>:the registered handler number or -1 in case of error
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Register a new set of I/O callback for handling output.

Packit 423ecb
<tt>matchFunc</tt>:the xmlOutputMatchCallback
<tt>openFunc</tt>:the xmlOutputOpenCallback
<tt>writeFunc</tt>:the xmlOutputWriteCallback
<tt>closeFunc</tt>:the xmlOutputCloseCallback
<tt>Returns</tt>:the registered handler number or -1 in case of error
Packit 423ecb
        
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
  </body>
Packit 423ecb
</html>