1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

Added pointers to Igor page for the Windows binaries,

Daniel
This commit is contained in:
Daniel Veillard
2001-07-26 18:30:26 +00:00
parent ba4ad3263b
commit 951895369a

View File

@ -3,7 +3,7 @@
<html> <html>
<head> <head>
<title>The XML C library for Gnome</title> <title>The XML C library for Gnome</title>
<meta name="GENERATOR" content="amaya V5.0"> <meta name="GENERATOR" content="amaya V4.1">
<meta http-equiv="Content-Type" content="text/html"> <meta http-equiv="Content-Type" content="text/html">
</head> </head>
@ -117,8 +117,7 @@ libxml2</p>
internationalization support</a></li> internationalization support</a></li>
<li>This page provides a global overview and <a href="#real">some <li>This page provides a global overview and <a href="#real">some
examples</a> on how to use libxml.</li> examples</a> on how to use libxml.</li>
<li><a href="mailto:james@daa.com.au">James Henstridge</a> <li><a href="mailto:james@daa.com.au">James Henstridge</a> wrote <a
wrote <a
href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">some nice href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">some nice
documentation</a> explaining how to use the libxml SAX interface.</li> documentation</a> explaining how to use the libxml SAX interface.</li>
<li>George Lebl wrote <a <li>George Lebl wrote <a
@ -135,24 +134,22 @@ libxml2</p>
<h2><a name="Reporting">Reporting bugs and getting help</a></h2> <h2><a name="Reporting">Reporting bugs and getting help</a></h2>
<p>Well, bugs or missing features are always possible, and I will make a <p>Well, bugs or missing features are always possible, and I will make a point
point of fixing them in a timely fashion. The best way to report a bug is to of fixing them in a timely fashion. The best way to report a bug is to use the
use the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">Gnome <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml">Gnome bug
bug tracking database</a> (make sure to use the "libxml" module name). I look tracking database</a> (make sure to use the "libxml" module name). I look at
at reports there regularly and it's good to have a reminder when a bug is reports there regularly and it's good to have a reminder when a bug is still
still open. Check the <a open. Check the <a
href="http://bugzilla.gnome.org/bugwritinghelp.html">instructions on href="http://bugzilla.gnome.org/bugwritinghelp.html">instructions on reporting
reporting bugs</a> and be sure to specify that the bug is for the package bugs</a> and be sure to specify that the bug is for the package libxml.</p>
libxml.</p>
<p>There is also a mailing-list <a <p>There is also a mailing-list <a
href="mailto:xml@gnome.org">xml@gnome.org</a> for libxml, with an <a href="mailto:xml@gnome.org">xml@gnome.org</a> for libxml, with an <a
href="http://mail.gnome.org/archives/xml/">on-line archive</a> (<a href="http://mail.gnome.org/archives/xml/">on-line archive</a> (<a
href="http://xmlsoft.org/messages">old</a>). To subscribe to this list, href="http://xmlsoft.org/messages">old</a>). To subscribe to this list, please
please visit the <a visit the <a href="http://mail.gnome.org/mailman/listinfo/xml">associated
href="http://mail.gnome.org/mailman/listinfo/xml">associated Web</a> page and Web</a> page and follow the instructions. <strong>Do not send code, I won't
follow the instructions. <strong>Do not send code, I won't debug it</strong> debug it</strong> (but patches are really appreciated!).</p>
(but patches are really appreciated!).</p>
<p>Check the following too before posting:</p> <p>Check the following too before posting:</p>
<ul> <ul>
@ -160,8 +157,8 @@ follow the instructions. <strong>Do not send code, I won't debug it</strong>
version</a>, and that the problem still shows up in those</li> version</a>, and that the problem still shows up in those</li>
<li>check the <a href="http://mail.gnome.org/archives/xml/">list <li>check the <a href="http://mail.gnome.org/archives/xml/">list
archives</a> to see if the problem was reported already, in this case archives</a> to see if the problem was reported already, in this case
there is probably a fix available, similary check the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml&amp;product=libxslt&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=NEEDINFO&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;emailreporter1=1&amp;emailcc1=1&amp;emaillongdesc1=1&amp;email2=&amp;emailtype2=substring&amp;emailassigned_to2=1&amp;emailreporter2=1&amp;emailcc2=1&amp;emaillongdesc2=1&amp;changedin=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;short_desc=&amp;short_desc_type=substring&amp;long_desc=&amp;long_desc_type=substring&amp;bug_file_loc=&amp;bug_file_loc_type=substring&amp;status_whiteboard=&amp;status_whiteboard_type=substring&amp;keywords=&amp;keywords_type=anywords&amp;op_sys_details=&amp;op_sys_details_type=substring&amp;version_details=&amp;version_details_type=substring&amp;cmdtype=doit&amp;newqueryname=&amp;order=Reuse+same+sort+as+last+time&amp;form_name=query">registered there is probably a fix available, similary check the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml&amp;product=libxslt&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=NEEDINFO&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;emailreporter1=1&amp;emailcc1=1&amp;emaillongdesc1=1&amp;email2=&amp;emailtype2=substring&amp;emailassigned_to2=1&amp;emailreporter2=1&amp;emailcc2=1&amp;emaillongdesc2=1&amp;changedin=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;short_desc=&amp;short_desc_type=substring&amp;long_desc=&amp;long_desc_type=substring&amp;bug_file_loc=&amp;bug_file_loc_type=substring&amp;status_whiteboard=&amp;status_whiteboard_type=substring&amp;keywords=&amp;keywords_type=anywords&amp;op_sys_details=&amp;op_sys_details_type=substring&amp;version_details=&amp;version_details_type=substring&amp;cmdtype=doit&amp;newqueryname=&amp;order=Reuse+same+sort+as+last+time&amp;form_name=query">registered open
open bugs</a></li> bugs</a></li>
<li>make sure you can reproduce the bug with xmllint or one of the test <li>make sure you can reproduce the bug with xmllint or one of the test
programs found in source in the distribution</li> programs found in source in the distribution</li>
<li>Please send the command showing the error as well as the input (as an <li>Please send the command showing the error as well as the input (as an
@ -170,10 +167,9 @@ follow the instructions. <strong>Do not send code, I won't debug it</strong>
<p>Alternatively, you can just send the bug to the <a <p>Alternatively, you can just send the bug to the <a
href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml
related I will approve it.. Please do not send me mail directly especially related I will approve it.. Please do not send me mail directly especially for
for portability problem, it makes things really harder to track and in some portability problem, it makes things really harder to track and in some cases
cases I'm not the best person to answer a given question, ask the list I'm not the best person to answer a given question, ask the list instead.</p>
instead.</p>
<p>Of course, bugs reported with a suggested patch for fixing them will <p>Of course, bugs reported with a suggested patch for fixing them will
probably be processed faster.</p> probably be processed faster.</p>
@ -220,7 +216,11 @@ href="ftp://ftp.gnome.org/pub/GNOME/stable/redhat/i386/libxml/">RPM
packages</a>. (NOTE that you need both the <a packages</a>. (NOTE that you need both the <a
href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a
href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a> href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a>
packages installed to compile applications using libxml.)</p> packages installed to compile applications using libxml.) <a
href="mailto:izlatkovic@daenet.de">Igor Zlatkovic</a> is now the maintainer
of the Windows port, <a
href="http://www.fh-frankfurt.de/~igor/projects/libxml/index.html">he provides
binaries</a></p>
<p><a name="Snapshot">Snapshot:</a></p> <p><a name="Snapshot">Snapshot:</a></p>
<ul> <ul>
@ -241,8 +241,8 @@ platform, get in touch with me to upload the package. I will keep them in the
<li><p>The <a <li><p>The <a
href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Gnome href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gnome-xml">Gnome
CVS base</a>. Check the <a CVS base</a>. Check the <a
href="http://developer.gnome.org/tools/cvs.html">Gnome CVS Tools</a> href="http://developer.gnome.org/tools/cvs.html">Gnome CVS Tools</a> page;
page; the CVS module is <b>gnome-xml</b>.</p> the CVS module is <b>gnome-xml</b>.</p>
</li> </li>
<li>The <strong>libxslt</strong> module is also present there</li> <li>The <strong>libxslt</strong> module is also present there</li>
</ul> </ul>
@ -256,12 +256,12 @@ for a really accurate description</h3>
<p>Items floating around but not actively worked on, get in touch with me if <p>Items floating around but not actively worked on, get in touch with me if
you want to test those</p> you want to test those</p>
<ul> <ul>
<li>Implementing <a href="http://xmlsoft.org/XSLT">XSLT</a>, this is done <li>Implementing <a href="http://xmlsoft.org/XSLT">XSLT</a>, this is done as
as a separate C library on top of libxml called libxslt</li> a separate C library on top of libxml called libxslt</li>
<li>Finishing up <a href="http://www.w3.org/TR/xptr">XPointer</a> and <a <li>Finishing up <a href="http://www.w3.org/TR/xptr">XPointer</a> and <a
href="http://www.w3.org/TR/xinclude">XInclude</a></li> href="http://www.w3.org/TR/xinclude">XInclude</a></li>
<li>(seeems working but delayed from release) parsing/import of Docbook <li>(seeems working but delayed from release) parsing/import of Docbook SGML
SGML docs</li> docs</li>
</ul> </ul>
<h3>2.4.0: July 10 2001</h3> <h3>2.4.0: July 10 2001</h3>
@ -274,8 +274,8 @@ you want to test those</p>
<h3>2.3.14: July 5 2001</h3> <h3>2.3.14: July 5 2001</h3>
<ul> <ul>
<li>fixed some entities problems and reduce mem requirement when <li>fixed some entities problems and reduce mem requirement when substituing
substituing them</li> them</li>
<li>lots of improvements in the XPath queries interpreter can be <li>lots of improvements in the XPath queries interpreter can be
substancially faster</li> substancially faster</li>
<li>Makefiles and configure cleanups</li> <li>Makefiles and configure cleanups</li>
@ -332,8 +332,8 @@ you want to test those</p>
<h3>2.3.10: June 1 2001</h3> <h3>2.3.10: June 1 2001</h3>
<ul> <ul>
<li>fixed the SGML catalog support</li> <li>fixed the SGML catalog support</li>
<li>a number of reported bugs got fixed, in XPath, iconv detection, <li>a number of reported bugs got fixed, in XPath, iconv detection, XInclude
XInclude processing</li> processing</li>
<li>XPath string function should now handle unicode correctly</li> <li>XPath string function should now handle unicode correctly</li>
</ul> </ul>
@ -368,8 +368,8 @@ you want to test those</p>
<li>Fixed a few things in the HTML parser</li> <li>Fixed a few things in the HTML parser</li>
<li>Fixed some XPath bugs raised by XSLT use, tried to fix the floating <li>Fixed some XPath bugs raised by XSLT use, tried to fix the floating
point portability issue</li> point portability issue</li>
<li>Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for <li>Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for DOM+validation
DOM+validation using the XML REC as input and a 700MHz celeron).</li> using the XML REC as input and a 700MHz celeron).</li>
<li>incorporated more Windows cleanup</li> <li>incorporated more Windows cleanup</li>
<li>added xmlSaveFormatFile()</li> <li>added xmlSaveFormatFile()</li>
<li>fixed problems in copying nodes with entities references (gdome)</li> <li>fixed problems in copying nodes with entities references (gdome)</li>
@ -398,9 +398,9 @@ you want to test those</p>
<li>cleaned up the user of some of the string formatting function. used the <li>cleaned up the user of some of the string formatting function. used the
trio library code to provide the one needed when the platform is missing trio library code to provide the one needed when the platform is missing
them</li> them</li>
<li>xpath: removed a memory leak and fixed the predicate evaluation <li>xpath: removed a memory leak and fixed the predicate evaluation problem,
problem, extended the testsuite and cleaned up the result. XPointer seems extended the testsuite and cleaned up the result. XPointer seems broken
broken ...</li> ...</li>
</ul> </ul>
<h3>2.3.5: Mar 23 2001</h3> <h3>2.3.5: Mar 23 2001</h3>
@ -530,8 +530,8 @@ you want to test those</p>
<li>XPointer implementation and testsuite</li> <li>XPointer implementation and testsuite</li>
<li>Lot of XPath fixes, added variable and functions registration, more <li>Lot of XPath fixes, added variable and functions registration, more
tests</li> tests</li>
<li>Portability fixes, lots of enhancements toward an easy Windows build <li>Portability fixes, lots of enhancements toward an easy Windows build and
and release</li> release</li>
<li>Late validation fixes</li> <li>Late validation fixes</li>
<li>Integrated a lot of contributed patches</li> <li>Integrated a lot of contributed patches</li>
<li>added memory management docs</li> <li>added memory management docs</li>
@ -571,8 +571,8 @@ you want to test those</p>
<li>a purely bug fixes release</li> <li>a purely bug fixes release</li>
<li>fixed an encoding support problem when parsing from a memory block</li> <li>fixed an encoding support problem when parsing from a memory block</li>
<li>fixed a DOCTYPE parsing problem</li> <li>fixed a DOCTYPE parsing problem</li>
<li>removed a bug in the function allowing to override the memory <li>removed a bug in the function allowing to override the memory allocation
allocation routines</li> routines</li>
</ul> </ul>
<h3>2.2.0: July 14 2000</h3> <h3>2.2.0: July 14 2000</h3>
@ -645,8 +645,8 @@ you want to test those</p>
parser context using xmlCreateIOParserCtxt()</li> parser context using xmlCreateIOParserCtxt()</li>
<li>there is a C preprocessor macro LIBXML_VERSION providing the version <li>there is a C preprocessor macro LIBXML_VERSION providing the version
number of the libxml module in use</li> number of the libxml module in use</li>
<li>a number of optional features of libxml can now be excluded at <li>a number of optional features of libxml can now be excluded at configure
configure time (FTP/HTTP/HTML/XPath/Debug)</li> time (FTP/HTTP/HTML/XPath/Debug)</li>
</ul> </ul>
<h3>2.0.0beta: Mar 14 2000</h3> <h3>2.0.0beta: Mar 14 2000</h3>
@ -665,8 +665,8 @@ you want to test those</p>
<ul> <ul>
<li>fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly <li>fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
handled now</li> handled now</li>
<li>Better handling of entities, especially well formedness checking <li>Better handling of entities, especially well formedness checking and
and proper PEref extensions in external subsets</li> proper PEref extensions in external subsets</li>
<li>DTD conditional sections</li> <li>DTD conditional sections</li>
<li>Validation now correcly handle entities content</li> <li>Validation now correcly handle entities content</li>
<li><a href="http://rpmfind.net/tools/gdome/messages/0039.html">change <li><a href="http://rpmfind.net/tools/gdome/messages/0039.html">change
@ -685,9 +685,9 @@ you want to test those</p>
<li>This is a bug fix release:</li> <li>This is a bug fix release:</li>
<li>It is possible to disable the ignorable blanks heuristic used by <li>It is possible to disable the ignorable blanks heuristic used by
libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note
that for adherence to XML spec, this behaviour will be disabled by that for adherence to XML spec, this behaviour will be disabled by default
default in 2.x . The same function will allow to keep compatibility for in 2.x . The same function will allow to keep compatibility for old
old code.</li> code.</li>
<li>Blanks in &lt;a&gt; &lt;/a&gt; constructs are not ignored anymore, <li>Blanks in &lt;a&gt; &lt;/a&gt; constructs are not ignored anymore,
avoiding heuristic is really the Right Way :-\</li> avoiding heuristic is really the Right Way :-\</li>
<li>The unchecked use of snprintf which was breaking libxml-1.8.6 <li>The unchecked use of snprintf which was breaking libxml-1.8.6
@ -706,8 +706,8 @@ you want to test those</p>
<h3>1.8.5: Jan 21 2000</h3> <h3>1.8.5: Jan 21 2000</h3>
<ul> <ul>
<li>adding APIs to parse a well balanced chunk of XML (production <a <li>adding APIs to parse a well balanced chunk of XML (production <a
href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a> of the href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a> of the XML
XML spec)</li> spec)</li>
<li>fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no</li> <li>fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no</li>
<li>Jody Goldberg &lt;jgoldberg@home.com&gt; provided another patch trying <li>Jody Goldberg &lt;jgoldberg@home.com&gt; provided another patch trying
to solve the zlib checks problems</li> to solve the zlib checks problems</li>
@ -791,8 +791,8 @@ you want to test those</p>
<ul> <ul>
<li>The basic type for strings manipulated by libxml has been renamed in <li>The basic type for strings manipulated by libxml has been renamed in
1.7.1 from <strong>CHAR</strong> to <strong>xmlChar</strong>. The reason 1.7.1 from <strong>CHAR</strong> to <strong>xmlChar</strong>. The reason
is that CHAR was conflicting with a predefined type on Windows. However is that CHAR was conflicting with a predefined type on Windows. However on
on non WIN32 environment, compatibility is provided by the way of a non WIN32 environment, compatibility is provided by the way of a
<strong>#define </strong>.</li> <strong>#define </strong>.</li>
<li>Changed another error : the use of a structure field called errno, and <li>Changed another error : the use of a structure field called errno, and
leading to troubles on platforms where it's a macro</li> leading to troubles on platforms where it's a macro</li>
@ -834,14 +834,14 @@ document</a>:</p>
information about its encoding. Then the document is a text format whose information about its encoding. Then the document is a text format whose
structure is specified by tags between brackets. <strong>Each tag opened has structure is specified by tags between brackets. <strong>Each tag opened has
to be closed</strong>. XML is pedantic about this. However, if a tag is empty to be closed</strong>. XML is pedantic about this. However, if a tag is empty
(no content), a single tag can serve as both the opening and closing tag if (no content), a single tag can serve as both the opening and closing tag if it
it ends with <code>/&gt;</code> rather than with <code>&gt;</code>. Note ends with <code>/&gt;</code> rather than with <code>&gt;</code>. Note that,
that, for example, the image tag has no content (just an attribute) and is for example, the image tag has no content (just an attribute) and is closed by
closed by ending the tag with <code>/&gt;</code>.</p> ending the tag with <code>/&gt;</code>.</p>
<p>XML can be applied sucessfully to a wide range of uses, from long term <p>XML can be applied sucessfully to a wide range of uses, from long term
structured document maintenance (where it follows the steps of SGML) to structured document maintenance (where it follows the steps of SGML) to simple
simple data encoding mechanisms like configuration file formatting (glade), data encoding mechanisms like configuration file formatting (glade),
spreadsheets (gnumeric), or even shorter lived documents such as WebDAV where spreadsheets (gnumeric), or even shorter lived documents such as WebDAV where
it is used to encode remote calls between a client and a server.</p> it is used to encode remote calls between a client and a server.</p>
@ -849,16 +849,16 @@ it is used to encode remote calls between a client and a server.</p>
<p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p> <p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p>
<p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a <p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a language
language for transforming XML documents into other XML documents (or for transforming XML documents into other XML documents (or HTML/textual
HTML/textual output).</p> output).</p>
<p>A separate library called libxslt is being built on top of libxml2. This <p>A separate library called libxslt is being built on top of libxml2. This
module "libxslt" can be found in the Gnome CVS base too.</p> module "libxslt" can be found in the Gnome CVS base too.</p>
<p>You can check the <a <p>You can check the <a
href="http://cvs.gnome.org/lxr/source/libxslt/FEATURES">features</a> href="http://cvs.gnome.org/lxr/source/libxslt/FEATURES">features</a> supported
supported and the progresses on the <a and the progresses on the <a
href="http://cvs.gnome.org/lxr/source/libxslt/ChangeLog">Changelog</a></p> href="http://cvs.gnome.org/lxr/source/libxslt/ChangeLog">Changelog</a></p>
<h2>An overview of libxml architecture</h2> <h2>An overview of libxml architecture</h2>
@ -946,10 +946,10 @@ standalone=true
<p>Sometimes the DOM tree output is just too large to fit reasonably into <p>Sometimes the DOM tree output is just too large to fit reasonably into
memory. In that case (and if you don't expect to save back the XML document memory. In that case (and if you don't expect to save back the XML document
loaded using libxml), it's better to use the SAX interface of libxml. SAX is loaded using libxml), it's better to use the SAX interface of libxml. SAX is a
a <strong>callback-based interface</strong> to the parser. Before parsing, <strong>callback-based interface</strong> to the parser. Before parsing, the
the application layer registers a customized set of callbacks which are application layer registers a customized set of callbacks which are called by
called by the library as it progresses through the XML input.</p> the library as it progresses through the XML input.</p>
<p>To get more detailed step-by-step guidance on using the SAX interface of <p>To get more detailed step-by-step guidance on using the SAX interface of
libxml, see the <a libxml, see the <a
@ -1006,12 +1006,11 @@ interface.</p>
<h2><a name="library">The XML library interfaces</a></h2> <h2><a name="library">The XML library interfaces</a></h2>
<p>This section is directly intended to help programmers getting bootstrapped <p>This section is directly intended to help programmers getting bootstrapped
using the XML library from the C language. It is not intended to be using the XML library from the C language. It is not intended to be extensive.
extensive. I hope the automatically generated documents will provide the I hope the automatically generated documents will provide the completeness
completeness required, but as a separate set of documents. The interfaces of required, but as a separate set of documents. The interfaces of the XML
the XML library are by principle low level, there is nearly zero abstraction. library are by principle low level, there is nearly zero abstraction. Those
Those interested in a higher level API should <a href="#DOM">look at interested in a higher level API should <a href="#DOM">look at DOM</a>.</p>
DOM</a>.</p>
<p>The <a href="html/libxml-parser.html">parser interfaces for XML</a> are <p>The <a href="html/libxml-parser.html">parser interfaces for XML</a> are
separated from the <a href="html/libxml-htmlparser.html">HTML parser separated from the <a href="html/libxml-htmlparser.html">HTML parser
@ -1039,8 +1038,8 @@ failure).</p>
<h3 id="Invoking1">Invoking the parser: the push method</h3> <h3 id="Invoking1">Invoking the parser: the push method</h3>
<p>In order for the application to keep the control when the document is <p>In order for the application to keep the control when the document is being
being fetched (which is common for GUI based programs) libxml provides a push fetched (which is common for GUI based programs) libxml provides a push
interface, too, as of version 1.8.3. Here are the interface functions:</p> interface, too, as of version 1.8.3. Here are the interface functions:</p>
<pre>xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, <pre>xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
void *user_data, void *user_data,
@ -1091,8 +1090,8 @@ limited to SAX: just use the two first arguments of
<p>The other way to get an XML tree in memory is by building it. Basically <p>The other way to get an XML tree in memory is by building it. Basically
there is a set of functions dedicated to building new elements. (These are there is a set of functions dedicated to building new elements. (These are
also described in &lt;libxml/tree.h&gt;.) For example, here is a piece of also described in &lt;libxml/tree.h&gt;.) For example, here is a piece of code
code that produces the XML document used in the previous examples:</p> that produces the XML document used in the previous examples:</p>
<pre> #include &lt;libxml/tree.h&gt; <pre> #include &lt;libxml/tree.h&gt;
xmlDocPtr doc; xmlDocPtr doc;
xmlNodePtr tree, subtree; xmlNodePtr tree, subtree;
@ -1114,8 +1113,8 @@ code that produces the XML document used in the previous examples:</p>
<h3><a name="Traversing">Traversing the tree</a></h3> <h3><a name="Traversing">Traversing the tree</a></h3>
<p>Basically by <a href="html/libxml-tree.html">including "tree.h"</a> your <p>Basically by <a href="html/libxml-tree.html">including "tree.h"</a> your
code has access to the internal structure of all the elements of the tree. code has access to the internal structure of all the elements of the tree. The
The names should be somewhat simple like <strong>parent</strong>, names should be somewhat simple like <strong>parent</strong>,
<strong>children</strong>, <strong>next</strong>, <strong>prev</strong>, <strong>children</strong>, <strong>next</strong>, <strong>prev</strong>,
<strong>properties</strong>, etc... For example, still with the previous <strong>properties</strong>, etc... For example, still with the previous
example:</p> example:</p>
@ -1139,8 +1138,8 @@ is an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p>
<dl> <dl>
<dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const <dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const
xmlChar *value);</code></dt> xmlChar *value);</code></dt>
<dd><p>This sets (or changes) an attribute carried by an ELEMENT node. <dd><p>This sets (or changes) an attribute carried by an ELEMENT node. The
The value can be NULL.</p> value can be NULL.</p>
</dd> </dd>
</dl> </dl>
<dl> <dl>
@ -1151,8 +1150,8 @@ is an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p>
</dd> </dd>
</dl> </dl>
<p>Two functions are provided for reading and writing the text associated <p>Two functions are provided for reading and writing the text associated with
with elements:</p> elements:</p>
<dl> <dl>
<dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar <dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar
*value);</code></dt> *value);</code></dt>
@ -1252,9 +1251,9 @@ for the character '&gt;', <strong>&amp;apos;</strong> for the character ''',
substitute an entity's content so that you can see the replacement text in substitute an entity's content so that you can see the replacement text in
your application. Or you may prefer to keep entity references as such in the your application. Or you may prefer to keep entity references as such in the
content to be able to save the document back without losing this usually content to be able to save the document back without losing this usually
precious information (if the user went through the pain of explicitly precious information (if the user went through the pain of explicitly defining
defining entities, he may have a a rather negative attitude if you blindly entities, he may have a a rather negative attitude if you blindly susbtitute
susbtitute them as saving time). The <a them as saving time). The <a
href="html/libxml-parser.html#XMLSUBSTITUTEENTITIESDEFAULT">xmlSubstituteEntitiesDefault()</a> href="html/libxml-parser.html#XMLSUBSTITUTEENTITIESDEFAULT">xmlSubstituteEntitiesDefault()</a>
function allows you to check and change the behaviour, which is to not function allows you to check and change the behaviour, which is to not
substitute entities by default.</p> substitute entities by default.</p>
@ -1348,9 +1347,8 @@ so even if you plan to use or currently are using validation I strongly
suggest adding namespaces to your document. A default namespace scheme suggest adding namespaces to your document. A default namespace scheme
<code>xmlns="http://...."</code> should not break validity even on less <code>xmlns="http://...."</code> should not break validity even on less
flexible parsers. Using namespaces to mix and differentiate content coming flexible parsers. Using namespaces to mix and differentiate content coming
from multiple DTDs will certainly break current validation schemes. I will from multiple DTDs will certainly break current validation schemes. I will try
try to provide ways to do this, but this may not be portable or to provide ways to do this, but this may not be portable or standardized.</p>
standardized.</p>
<h2><a name="Validation">Validation, or are you afraid of DTDs ?</a></h2> <h2><a name="Validation">Validation, or are you afraid of DTDs ?</a></h2>
@ -1362,25 +1360,25 @@ a set of rules.</p>
<p>The validation process and building DTDs are the two most difficult parts <p>The validation process and building DTDs are the two most difficult parts
of the XML life cycle. Briefly a DTD defines all the possibles element to be of the XML life cycle. Briefly a DTD defines all the possibles element to be
found within your document, what is the formal shape of your document tree found within your document, what is the formal shape of your document tree (by
(by defining the allowed content of an element, either text, a regular defining the allowed content of an element, either text, a regular expression
expression for the allowed list of children, or mixed content i.e. both text for the allowed list of children, or mixed content i.e. both text and
and children). The DTD also defines the allowed attributes for all elements children). The DTD also defines the allowed attributes for all elements and
and the types of the attributes. For more detailed information, I suggest the types of the attributes. For more detailed information, I suggest that you
that you read the related parts of the XML specification, the examples found read the related parts of the XML specification, the examples found under
under gnome-xml/test/valid/dtd and any of the large number of books available gnome-xml/test/valid/dtd and any of the large number of books available on
on XML. The dia example in gnome-xml/test/valid should be both simple and XML. The dia example in gnome-xml/test/valid should be both simple and
complete enough to allow you to build your own.</p> complete enough to allow you to build your own.</p>
<p>A word of warning, building a good DTD which will fit the needs of your <p>A word of warning, building a good DTD which will fit the needs of your
application in the long-term is far from trivial; however, the extra level of application in the long-term is far from trivial; however, the extra level of
quality it can ensure is well worth the price for some sets of applications quality it can ensure is well worth the price for some sets of applications or
or if you already have already a DTD defined for your application field.</p> if you already have already a DTD defined for your application field.</p>
<p>The validation is not completely finished but in a (very IMHO) usable <p>The validation is not completely finished but in a (very IMHO) usable
state. Until a real validation interface is defined the way to do it is to state. Until a real validation interface is defined the way to do it is to
define and set the <strong>xmlDoValidityCheckingDefaultValue</strong> define and set the <strong>xmlDoValidityCheckingDefaultValue</strong> external
external variable to 1, this will of course be changed at some point:</p> variable to 1, this will of course be changed at some point:</p>
<p>extern int xmlDoValidityCheckingDefaultValue;</p> <p>extern int xmlDoValidityCheckingDefaultValue;</p>
@ -1399,12 +1397,11 @@ core.</p>
<h2><a name="DOM"></a><a name="Principles">DOM Principles</a></h2> <h2><a name="DOM"></a><a name="Principles">DOM Principles</a></h2>
<p><a href="http://www.w3.org/DOM/">DOM</a> stands for the <em>Document <p><a href="http://www.w3.org/DOM/">DOM</a> stands for the <em>Document Object
Object Model</em>; this is an API for accessing XML or HTML structured Model</em>; this is an API for accessing XML or HTML structured documents.
documents. Native support for DOM in Gnome is on the way (module gnome-dom), Native support for DOM in Gnome is on the way (module gnome-dom), and will be
and will be based on gnome-xml. This will be a far cleaner interface to based on gnome-xml. This will be a far cleaner interface to manipulate XML
manipulate XML files within Gnome since it won't expose the internal files within Gnome since it won't expose the internal structure.</p>
structure.</p>
<p>The current DOM implementation on top of libxml is the <a <p>The current DOM implementation on top of libxml is the <a
href="http://cvs.gnome.org/lxr/source/gdome2/">gdome2 Gnome module</a>, this href="http://cvs.gnome.org/lxr/source/gdome2/">gdome2 Gnome module</a>, this
@ -1476,13 +1473,13 @@ base</a>:</p>
&lt;/gjob:Jobs&gt; &lt;/gjob:Jobs&gt;
&lt;/gjob:Helping&gt;</pre> &lt;/gjob:Helping&gt;</pre>
<p>While loading the XML file into an internal DOM tree is a matter of <p>While loading the XML file into an internal DOM tree is a matter of calling
calling only a couple of functions, browsing the tree to gather the ata and only a couple of functions, browsing the tree to gather the ata and generate
generate the internal structures is harder, and more error prone.</p> the internal structures is harder, and more error prone.</p>
<p>The suggested principle is to be tolerant with respect to the input <p>The suggested principle is to be tolerant with respect to the input
structure. For example, the ordering of the attributes is not significant, structure. For example, the ordering of the attributes is not significant, the
the XML specification is clear about it. It's also usually a good idea not to XML specification is clear about it. It's also usually a good idea not to
depend on the order of the children of a given node, unless it really makes depend on the order of the children of a given node, unless it really makes
things harder. Here is some code to parse the information for a person:</p> things harder. Here is some code to parse the information for a person:</p>
<pre>/* <pre>/*
@ -1533,13 +1530,13 @@ DEBUG("parsePerson\n");
<li>Usually a recursive parsing style is the more convenient one: XML data <li>Usually a recursive parsing style is the more convenient one: XML data
is by nature subject to repetitive constructs and usually exibits highly is by nature subject to repetitive constructs and usually exibits highly
stuctured patterns.</li> stuctured patterns.</li>
<li>The two arguments of type <em>xmlDocPtr</em> and <em>xmlNsPtr</em>, <li>The two arguments of type <em>xmlDocPtr</em> and <em>xmlNsPtr</em>, i.e.
i.e. the pointer to the global XML document and the namespace reserved to the pointer to the global XML document and the namespace reserved to the
the application. Document wide information are needed for example to application. Document wide information are needed for example to decode
decode entities and it's a good coding practice to define a namespace for entities and it's a good coding practice to define a namespace for your
your application set of data and test that the element and attributes application set of data and test that the element and attributes you're
you're analyzing actually pertains to your application space. This is analyzing actually pertains to your application space. This is done by a
done by a simple equality test (cur-&gt;ns == ns).</li> simple equality test (cur-&gt;ns == ns).</li>
<li>To retrieve text and attributes value, you can use the function <li>To retrieve text and attributes value, you can use the function
<em>xmlNodeListGetString</em> to gather all the text and entity reference <em>xmlNodeListGetString</em> to gather all the text and entity reference
nodes generated by the DOM output and produce an single text string.</li> nodes generated by the DOM output and produce an single text string.</li>
@ -1600,10 +1597,10 @@ DEBUG("parseJob\n");
}</pre> }</pre>
<p>Once you are used to it, writing this kind of code is quite simple, but <p>Once you are used to it, writing this kind of code is quite simple, but
boring. Ultimately, it could be possble to write stubbers taking either C boring. Ultimately, it could be possble to write stubbers taking either C data
data structure definitions, a set of XML examples or an XML DTD and produce structure definitions, a set of XML examples or an XML DTD and produce the
the code needed to import and export the content between C data and XML code needed to import and export the content between C data and XML storage.
storage. This is left as an exercise to the reader :-)</p> This is left as an exercise to the reader :-)</p>
<p>Feel free to use <a href="example/gjobread.c">the code for the full C <p>Feel free to use <a href="example/gjobread.c">the code for the full C
parsing example</a> as a template, it is also available with Makefile in the parsing example</a> as a template, it is also available with Makefile in the
@ -1611,33 +1608,29 @@ Gnome CVS base under gnome-xml/example</p>
<h2><a name="Contributi">Contributions</a></h2> <h2><a name="Contributi">Contributions</a></h2>
<ul> <ul>
<li><a href="mailto:ari@lusis.org">Ari Johnson</a> <li><a href="mailto:ari@lusis.org">Ari Johnson</a> provides a C++ wrapper
provides a C++ wrapper for libxml: for libxml:
<p>Website: <a <p>Website: <a
href="http://lusis.org/~ari/xml++/">http://lusis.org/~ari/xml++/</a></p> href="http://lusis.org/~ari/xml++/">http://lusis.org/~ari/xml++/</a></p>
<p>Download: <a <p>Download: <a
href="http://lusis.org/~ari/xml++/libxml++.tar.gz">http://lusis.org/~ari/xml++/libxml++.tar.gz</a></p> href="http://lusis.org/~ari/xml++/libxml++.tar.gz">http://lusis.org/~ari/xml++/libxml++.tar.gz</a></p>
</li> </li>
<li><a href="mailto:doolin@cs.utk.edu">David Doolin</a> <li><a href="mailto:izlatkovic@daenet.de">Igor Zlatkovic</a> is now the
provides a precompiled Windows version maintainer of the Windows port, <a
<p><a href="http://www.fh-frankfurt.de/~igor/projects/libxml/index.html">he
href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a> provides binaries</a></li>
(older). The distribution now includes projects and makefiles for Windows
compiler contributed by various people.</p>
</li>
<li><a <li><a
href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt
Sergeant</a> Sergeant</a> developped <a
developped <a href="http://axkit.org/download/">XML::LibXSLT</a>, a perl href="http://axkit.org/download/">XML::LibXSLT</a>, a perl wrapper for
wrapper for libxml2/libxslt as part of the <a libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML
href="http://axkit.com/">AxKit XML application server</a></li> application server</a></li>
<li><a href="mailto:fnatter@gmx.net">Felix Natter</a> <li><a href="mailto:fnatter@gmx.net">Felix Natter</a> and <a
and <a href="mailto:geertk@ai.rug.nl">Geert Kloosterman</a> provide <a href="mailto:geertk@ai.rug.nl">Geert Kloosterman</a> provide <a
href="libxml-doc.el">an emacs module</a> to lookup libxml(2) functions href="libxml-doc.el">an emacs module</a> to lookup libxml(2) functions
documentation</li> documentation</li>
<li><a href="mailto:sherwin@nlm.nih.gov">Ziying Sherwin</a> <li><a href="mailto:sherwin@nlm.nih.gov">Ziying Sherwin</a> provided <a
provided <a href="http://xmlsoft.org/messages/0488.html">man href="http://xmlsoft.org/messages/0488.html">man pages</a></li>
pages</a></li>
<li>there is a module for <a <li>there is a module for <a
href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxslt support href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxslt support
in OpenNSD/AOLServer</a></li> in OpenNSD/AOLServer</a></li>
@ -1647,6 +1640,6 @@ Gnome CVS base under gnome-xml/example</p>
<p><a href="mailto:Daniel.Veillard@imag.fr">Daniel Veillard</a></p> <p><a href="mailto:Daniel.Veillard@imag.fr">Daniel Veillard</a></p>
<p>$Id: xml.html,v 1.101 2001/07/10 15:49:42 veillard Exp $</p> <p>$Id: xml.html,v 1.102 2001/07/10 17:53:07 veillard Exp $</p>
</body> </body>
</html> </html>