1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00
Files
libxml2/doc/html/gnome-xml-xmlio.html

1904 lines
27 KiB
HTML

<HTML
><HEAD
><TITLE
>xmlIO</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
REL="HOME"
TITLE="Gnome XML Library Reference Manual"
HREF="book1.html"><LINK
REL="UP"
TITLE="Libxml Library Reference"
HREF="libxml-lib.html"><LINK
REL="PREVIOUS"
TITLE="nanoftp"
HREF="gnome-xml-nanoftp.html"><LINK
REL="NEXT"
TITLE="parserInternals"
HREF="gnome-xml-parserinternals.html"></HEAD
><BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TH
COLSPAN="4"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="5"
>Gnome XML Library Reference Manual</FONT
></TH
></TR
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gnome-xml-nanoftp.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libxml-lib.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnome-xml-parserinternals.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
></TABLE
></DIV
><H1
>xmlIO</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN10710"
></A
><H2
>Name</H2
>xmlIO &#8212; </DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN10713"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;
int (<A
HREF="gnome-xml-xmlio.html#XMLINPUTMATCHCALLBACK"
>*xmlInputMatchCallback</A
>) (char const *filename);
void* (<A
HREF="gnome-xml-xmlio.html#XMLINPUTOPENCALLBACK"
>*xmlInputOpenCallback</A
>) (char const *filename);
int (<A
HREF="gnome-xml-xmlio.html#XMLINPUTREADCALLBACK"
>*xmlInputReadCallback</A
>) (void *context,
char *buffer,
int len);
void (<A
HREF="gnome-xml-xmlio.html#XMLINPUTCLOSECALLBACK"
>*xmlInputCloseCallback</A
>) (void *context);
struct <A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFER"
>xmlParserInputBuffer</A
>;
typedef <A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
>;
<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> <A
HREF="gnome-xml-xmlio.html#XMLALLOCPARSERINPUTBUFFER"
>xmlAllocParserInputBuffer</A
>
(<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);
<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> <A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERCREATEFILENAME"
>xmlParserInputBufferCreateFilename</A
>
(const char *filename,
<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);
<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> <A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERCREATEFILE"
>xmlParserInputBufferCreateFile</A
>
(<GTKDOCLINK
HREF="FILE"
>FILE</GTKDOCLINK
> *file,
<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);
<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> <A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERCREATEFD"
>xmlParserInputBufferCreateFd</A
>
(int fd,
<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);
<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> <A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERCREATEIO"
>xmlParserInputBufferCreateIO</A
>
(<A
HREF="gnome-xml-xmlio.html#XMLINPUTREADCALLBACK"
>xmlInputReadCallback</A
> ioread,
<A
HREF="gnome-xml-xmlio.html#XMLINPUTCLOSECALLBACK"
>xmlInputCloseCallback</A
> ioclose,
void *ioctx,
<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);
int <A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERREAD"
>xmlParserInputBufferRead</A
> (<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> in,
int len);
int <A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERGROW"
>xmlParserInputBufferGrow</A
> (<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> in,
int len);
int <A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPUSH"
>xmlParserInputBufferPush</A
> (<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> in,
int len,
const char *buf);
void <A
HREF="gnome-xml-xmlio.html#XMLFREEPARSERINPUTBUFFER"
>xmlFreeParserInputBuffer</A
> (<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> in);
char* <A
HREF="gnome-xml-xmlio.html#XMLPARSERGETDIRECTORY"
>xmlParserGetDirectory</A
> (const char *filename);
int <A
HREF="gnome-xml-xmlio.html#XMLREGISTERINPUTCALLBACKS"
>xmlRegisterInputCallbacks</A
> (<A
HREF="gnome-xml-xmlio.html#XMLINPUTMATCHCALLBACK"
>xmlInputMatchCallback</A
> match,
<A
HREF="gnome-xml-xmlio.html#XMLINPUTOPENCALLBACK"
>xmlInputOpenCallback</A
> open,
<A
HREF="gnome-xml-xmlio.html#XMLINPUTREADCALLBACK"
>xmlInputReadCallback</A
> read,
<A
HREF="gnome-xml-xmlio.html#XMLINPUTCLOSECALLBACK"
>xmlInputCloseCallback</A
> close);</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN10754"
></A
><H2
>Description</H2
><P
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN10757"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN10759"
></A
><H3
><A
NAME="XMLINPUTMATCHCALLBACK"
></A
>xmlInputMatchCallback ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int (*xmlInputMatchCallback) (char const *filename);</PRE
></TD
></TR
></TABLE
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>filename</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10777"
></A
><H3
><A
NAME="XMLINPUTOPENCALLBACK"
></A
>xmlInputOpenCallback ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void* (*xmlInputOpenCallback) (char const *filename);</PRE
></TD
></TR
></TABLE
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>filename</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10791"
></A
><H3
><A
NAME="XMLINPUTREADCALLBACK"
></A
>xmlInputReadCallback ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int (*xmlInputReadCallback) (void *context,
char *buffer,
int len);</PRE
></TD
></TR
></TABLE
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>context</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>buffer</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>len</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10817"
></A
><H3
><A
NAME="XMLINPUTCLOSECALLBACK"
></A
>xmlInputCloseCallback ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void (*xmlInputCloseCallback) (void *context);</PRE
></TD
></TR
></TABLE
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>context</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10831"
></A
><H3
><A
NAME="XMLPARSERINPUTBUFFER"
></A
>struct xmlParserInputBuffer</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct xmlParserInputBuffer {
void* context;
xmlInputReadCallback readcallback;
xmlInputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */
};</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10836"
></A
><H3
><A
NAME="XMLPARSERINPUTBUFFERPTR"
></A
>xmlParserInputBufferPtr</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>typedef xmlParserInputBuffer *xmlParserInputBufferPtr;</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10841"
></A
><H3
><A
NAME="XMLALLOCPARSERINPUTBUFFER"
></A
>xmlAllocParserInputBuffer ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> xmlAllocParserInputBuffer
(<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);</PRE
></TD
></TR
></TABLE
><P
>Create a buffered parser input for progressive parsing</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>enc</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the charset encoding if known</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the new parser input or NULL</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10862"
></A
><H3
><A
NAME="XMLPARSERINPUTBUFFERCREATEFILENAME"
></A
>xmlParserInputBufferCreateFilename ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> xmlParserInputBufferCreateFilename
(const char *filename,
<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);</PRE
></TD
></TR
></TABLE
><P
>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</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>filename</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>enc</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the charset encoding if known</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the new parser input or NULL</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10887"
></A
><H3
><A
NAME="XMLPARSERINPUTBUFFERCREATEFILE"
></A
>xmlParserInputBufferCreateFile ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> xmlParserInputBufferCreateFile
(<GTKDOCLINK
HREF="FILE"
>FILE</GTKDOCLINK
> *file,
<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);</PRE
></TD
></TR
></TABLE
><P
>Create a buffered parser input for the progressive parsing of a FILE *
buffered C I/O</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>file</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> a FILE* </TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>enc</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the charset encoding if known</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the new parser input or NULL</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10913"
></A
><H3
><A
NAME="XMLPARSERINPUTBUFFERCREATEFD"
></A
>xmlParserInputBufferCreateFd ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> xmlParserInputBufferCreateFd
(int fd,
<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);</PRE
></TD
></TR
></TABLE
><P
>Create a buffered parser input for the progressive parsing for the input
from a file descriptor</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>fd</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> a file descriptor number</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>enc</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the charset encoding if known</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the new parser input or NULL</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10938"
></A
><H3
><A
NAME="XMLPARSERINPUTBUFFERCREATEIO"
></A
>xmlParserInputBufferCreateIO ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> xmlParserInputBufferCreateIO
(<A
HREF="gnome-xml-xmlio.html#XMLINPUTREADCALLBACK"
>xmlInputReadCallback</A
> ioread,
<A
HREF="gnome-xml-xmlio.html#XMLINPUTCLOSECALLBACK"
>xmlInputCloseCallback</A
> ioclose,
void *ioctx,
<A
HREF="gnome-xml-encoding.html#XMLCHARENCODING"
>xmlCharEncoding</A
> enc);</PRE
></TD
></TR
></TABLE
><P
>Create a buffered parser input for the progressive parsing for the input
from a file descriptor</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>ioread</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> an I/O read function</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>ioclose</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> an I/O close function</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>ioctx</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> an I/O handler</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>enc</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the charset encoding if known</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the new parser input or NULL</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10973"
></A
><H3
><A
NAME="XMLPARSERINPUTBUFFERREAD"
></A
>xmlParserInputBufferRead ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int xmlParserInputBufferRead (<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> in,
int len);</PRE
></TD
></TR
></TABLE
><P
>Refresh the content of the input buffer, the old data are considered
consumed
This routine handle the I18N transcoding to internal UTF-8</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>in</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> a buffered parser input</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>len</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> indicative value of the amount of chars to read</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the number of chars read and stored in the buffer, or -1
in case of error.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10997"
></A
><H3
><A
NAME="XMLPARSERINPUTBUFFERGROW"
></A
>xmlParserInputBufferGrow ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int xmlParserInputBufferGrow (<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> in,
int len);</PRE
></TD
></TR
></TABLE
><P
>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</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>in</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> a buffered parser input</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>len</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> indicative value of the amount of chars to read</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the number of chars read and stored in the buffer, or -1
in case of error.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN11021"
></A
><H3
><A
NAME="XMLPARSERINPUTBUFFERPUSH"
></A
>xmlParserInputBufferPush ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int xmlParserInputBufferPush (<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> in,
int len,
const char *buf);</PRE
></TD
></TR
></TABLE
><P
>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.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>in</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> a buffered parser input</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>len</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the size in bytes of the array.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>buf</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> an char array</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the number of chars read and stored in the buffer, or -1
in case of error.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN11049"
></A
><H3
><A
NAME="XMLFREEPARSERINPUTBUFFER"
></A
>xmlFreeParserInputBuffer ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void xmlFreeParserInputBuffer (<A
HREF="gnome-xml-xmlio.html#XMLPARSERINPUTBUFFERPTR"
>xmlParserInputBufferPtr</A
> in);</PRE
></TD
></TR
></TABLE
><P
>Free up the memory used by a buffered parser input</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>in</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> a buffered parser input</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN11065"
></A
><H3
><A
NAME="XMLPARSERGETDIRECTORY"
></A
>xmlParserGetDirectory ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>char* xmlParserGetDirectory (const char *filename);</PRE
></TD
></TR
></TABLE
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>filename</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN11083"
></A
><H3
><A
NAME="XMLREGISTERINPUTCALLBACKS"
></A
>xmlRegisterInputCallbacks ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int xmlRegisterInputCallbacks (<A
HREF="gnome-xml-xmlio.html#XMLINPUTMATCHCALLBACK"
>xmlInputMatchCallback</A
> match,
<A
HREF="gnome-xml-xmlio.html#XMLINPUTOPENCALLBACK"
>xmlInputOpenCallback</A
> open,
<A
HREF="gnome-xml-xmlio.html#XMLINPUTREADCALLBACK"
>xmlInputReadCallback</A
> read,
<A
HREF="gnome-xml-xmlio.html#XMLINPUTCLOSECALLBACK"
>xmlInputCloseCallback</A
> close);</PRE
></TD
></TR
></TABLE
><P
>Register a new set of I/O callback for handling parser input.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>match</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the xmlInputMatchCallback</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>open</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the xmlInputOpenCallback</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>read</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the xmlInputReadCallback</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>close</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the xmlInputCloseCallback</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the registered handler number or -1 in case of error</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><BR
CLEAR="all"><BR><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gnome-xml-nanoftp.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libxml-lib.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="gnome-xml-parserinternals.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="left"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>nanoftp</B
></FONT
></TD
><TD
COLSPAN="2"
ALIGN="right"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>parserInternals</B
></FONT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>