Blame doc/html/libxml-xmlIO.html

Packit 423ecb
Packit 423ecb
Packit 423ecb
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
Packit 423ecb
TD {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
Packit 423ecb
H1 {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
H2 {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
H3 {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
A:link, A:visited, A:active { text-decoration: underline }
Packit 423ecb
</style><style type="text/css">
Packit 423ecb
      div.deprecated pre.programlisting {border-style: double;border-color:red}
Packit 423ecb
      pre.programlisting {border-style: double;background: #EECFA1}
Packit 423ecb
    </style><title>Module xmlIO from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xmlIO from libxml2

<center>API Menu</center>
<form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form>
<center>API Indexes</center>
<center>Related links</center>

interface for the I/O interfaces used by the parser

Table of Contents

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

Description

Packit 423ecb

Function: xmlAllocOutputBuffer

xmlOutputBufferPtr	xmlAllocOutputBuffer	(xmlCharEncodingHandlerPtr encoder)
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

Function: xmlAllocParserInputBuffer

xmlParserInputBufferPtr	xmlAllocParserInputBuffer	(xmlCharEncoding enc)
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

Function: xmlCheckFilename

int	xmlCheckFilename		(const char * path)
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.

Function: xmlCheckHTTPInput

xmlParserInputPtr	xmlCheckHTTPInput	(xmlParserCtxtPtr ctxt, 
xmlParserInputPtr ret)
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.

Function: xmlCleanupInputCallbacks

void	xmlCleanupInputCallbacks	(void)
Packit 423ecb

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

Packit 423ecb

Function: xmlCleanupOutputCallbacks

void	xmlCleanupOutputCallbacks	(void)
Packit 423ecb

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

Packit 423ecb

Function: xmlFileClose

int	xmlFileClose			(void * context)
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

Function: xmlFileMatch

int	xmlFileMatch			(const char * filename)
Packit 423ecb

input from FILE *

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

Function: xmlFileOpen

void *	xmlFileOpen			(const char * filename)
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

Function: xmlFileRead

int	xmlFileRead			(void * context, 
char * buffer,
int len)
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

Function: xmlFreeParserInputBuffer

void	xmlFreeParserInputBuffer	(xmlParserInputBufferPtr in)
Packit 423ecb

Free up the memory used by a buffered parser input

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

Function: xmlIOFTPClose

int	xmlIOFTPClose			(void * context)
Packit 423ecb

Close an FTP I/O channel

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

Function: xmlIOFTPMatch

int	xmlIOFTPMatch			(const char * filename)
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

Function: xmlIOFTPOpen

void *	xmlIOFTPOpen			(const char * filename)
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

Function: xmlIOFTPRead

int	xmlIOFTPRead			(void * context, 
char * buffer,
int len)
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

Function: xmlIOHTTPClose

int	xmlIOHTTPClose			(void * context)
Packit 423ecb

Close an HTTP I/O channel

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

Function: xmlIOHTTPMatch

int	xmlIOHTTPMatch			(const char * filename)
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

Function: xmlIOHTTPOpen

void *	xmlIOHTTPOpen			(const char * filename)
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

Function: xmlIOHTTPOpenW

void *	xmlIOHTTPOpenW			(const char * post_uri, 
int compression)
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.

Function: xmlIOHTTPRead

int	xmlIOHTTPRead			(void * context, 
char * buffer,
int len)
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

Function type: xmlInputCloseCallback

Function type: xmlInputCloseCallback
Packit 423ecb
int	xmlInputCloseCallback		(void * context)
Packit 423ecb

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

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

Packit 423ecb

Function type: xmlInputMatchCallback

Function type: xmlInputMatchCallback
Packit 423ecb
int	xmlInputMatchCallback		(char const * filename)
Packit 423ecb

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

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

Packit 423ecb

Function type: xmlInputOpenCallback

Function type: xmlInputOpenCallback
Packit 423ecb
void *	xmlInputOpenCallback		(char const * filename)
Packit 423ecb

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

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

Packit 423ecb

Function type: xmlInputReadCallback

Function type: xmlInputReadCallback
Packit 423ecb
int	xmlInputReadCallback		(void * context, 
char * buffer,
int len)
Packit 423ecb

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

<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

Function: 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.

Function: 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

Function: xmlOutputBufferClose

int	xmlOutputBufferClose		(xmlOutputBufferPtr out)
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.

Function: xmlOutputBufferCreateBuffer

xmlOutputBufferPtr	xmlOutputBufferCreateBuffer	(xmlBufferPtr buffer, 
xmlCharEncodingHandlerPtr encoder)
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

Function: xmlOutputBufferCreateFd

xmlOutputBufferPtr	xmlOutputBufferCreateFd	(int fd, 
xmlCharEncodingHandlerPtr encoder)
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

Function: 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

Function: 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

Function: xmlOutputBufferCreateIO

xmlOutputBufferPtr	xmlOutputBufferCreateIO	(xmlOutputWriteCallback iowrite, 
xmlOutputCloseCallback ioclose,
void * ioctx,
xmlCharEncodingHandlerPtr encoder)
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

Function: xmlOutputBufferFlush

int	xmlOutputBufferFlush		(xmlOutputBufferPtr out)
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.

Function: xmlOutputBufferGetContent

const xmlChar *	xmlOutputBufferGetContent	(xmlOutputBufferPtr out)
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

Function: xmlOutputBufferGetSize

size_t	xmlOutputBufferGetSize		(xmlOutputBufferPtr out)
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

Function: xmlOutputBufferWrite

int	xmlOutputBufferWrite		(xmlOutputBufferPtr out, 
int len,
const char * buf)
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.

Function: xmlOutputBufferWriteEscape

int	xmlOutputBufferWriteEscape	(xmlOutputBufferPtr out, 
const xmlChar * str,
xmlCharEncodingOutputFunc escaping)
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.

Function: xmlOutputBufferWriteString

int	xmlOutputBufferWriteString	(xmlOutputBufferPtr out, 
const char * str)
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.

Function type: xmlOutputCloseCallback

Function type: xmlOutputCloseCallback
Packit 423ecb
int	xmlOutputCloseCallback		(void * context)
Packit 423ecb

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

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

Packit 423ecb

Function type: xmlOutputMatchCallback

Function type: xmlOutputMatchCallback
Packit 423ecb
int	xmlOutputMatchCallback		(char const * filename)
Packit 423ecb

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

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

Packit 423ecb

Function type: xmlOutputOpenCallback

Function type: xmlOutputOpenCallback
Packit 423ecb
void *	xmlOutputOpenCallback		(char const * filename)
Packit 423ecb

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

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

Packit 423ecb

Function type: xmlOutputWriteCallback

Function type: xmlOutputWriteCallback
Packit 423ecb
int	xmlOutputWriteCallback		(void * context, 
const char * buffer,
int len)
Packit 423ecb

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

<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

Function: xmlParserGetDirectory

char *	xmlParserGetDirectory		(const char * filename)
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.

Function: xmlParserInputBufferCreateFd

xmlParserInputBufferPtr	xmlParserInputBufferCreateFd	(int fd, 
xmlCharEncoding enc)
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

Function: 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

Function: 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

Function: xmlParserInputBufferCreateIO

xmlParserInputBufferPtr	xmlParserInputBufferCreateIO	(xmlInputReadCallback ioread, 
xmlInputCloseCallback ioclose,
void * ioctx,
xmlCharEncoding enc)
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

Function: 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

Function: 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

Function: xmlParserInputBufferGrow

int	xmlParserInputBufferGrow	(xmlParserInputBufferPtr in, 
int len)
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.

Function: xmlParserInputBufferPush

int	xmlParserInputBufferPush	(xmlParserInputBufferPtr in, 
int len,
const char * buf)
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.

Function: xmlParserInputBufferRead

int	xmlParserInputBufferRead	(xmlParserInputBufferPtr in, 
int len)
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.

Function: xmlPopInputCallbacks

int	xmlPopInputCallbacks		(void)
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.

Function: xmlRegisterDefaultInputCallbacks

void	xmlRegisterDefaultInputCallbacks	(void)
Packit 423ecb

Registers the default compiled-in I/O handlers.

Packit 423ecb

Function: xmlRegisterDefaultOutputCallbacks

void	xmlRegisterDefaultOutputCallbacks	(void)
Packit 423ecb

Registers the default compiled-in I/O handlers.

Packit 423ecb

Function: xmlRegisterHTTPPostCallbacks

void	xmlRegisterHTTPPostCallbacks	(void)
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

Function: xmlRegisterInputCallbacks

int	xmlRegisterInputCallbacks	(xmlInputMatchCallback matchFunc, 
xmlInputOpenCallback openFunc,
xmlInputReadCallback readFunc,
xmlInputCloseCallback closeFunc)
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

Function: xmlRegisterOutputCallbacks

int	xmlRegisterOutputCallbacks	(xmlOutputMatchCallback matchFunc, 
xmlOutputOpenCallback openFunc,
xmlOutputWriteCallback writeFunc,
xmlOutputCloseCallback closeFunc)
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

Daniel Veillard

</body></html>