fixed to point to releases of libxml2-2.6, Daniel
diff --git a/doc/library.html b/doc/library.html
index c2a2b3e..842dea1 100644
--- a/doc/library.html
+++ b/doc/library.html
@@ -16,7 +16,7 @@
separated from the <a href="html/libxml-htmlparser.html">HTML parser
interfaces</a>. Let's have a look at how the XML parser can be called:</p><h3><a name="Invoking" id="Invoking">Invoking the parser : the pull method</a></h3><p>Usually, the first thing to do is to read an XML input. The parser accepts
documents either from in-memory strings or from files. The functions are
-defined in "parser.h":</p><dl><dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt>
+defined in "parser.h":</p><dl><dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt>
<dd><p>Parse a null-terminated string containing the document.</p>
</dd>
</dl><dl><dt><code>xmlDocPtr xmlParseFile(const char *filename);</code></dt>
@@ -37,7 +37,7 @@
int size,
int terminate);</pre><p>and here is a simple example showing how to use the interface:</p><pre> FILE *f;
- f = fopen(filename, "r");
+ f = fopen(filename, "r");
if (f != NULL) {
int res, size = 1024;
char chars[1024];
@@ -55,7 +55,7 @@
xmlFreeParserCtxt(ctxt);
}
}</pre><p>The HTML parser embedded into libxml2 also has a push interface; the
-functions are just prefixed by "html" rather than "xml".</p><h3 id="Invoking2">Invoking the parser: the SAX interface</h3><p>The tree-building interface makes the parser memory-hungry, first loading
+functions are just prefixed by "html" rather than "xml".</p><h3 id="Invoking2">Invoking the parser: the SAX interface</h3><p>The tree-building interface makes the parser memory-hungry, first loading
the document in memory and then building the tree itself. Reading a document
without building the tree is possible using the SAX interfaces (see SAX.h and
<a href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">James
@@ -68,23 +68,23 @@
xmlDocPtr doc;
xmlNodePtr tree, subtree;
- doc = xmlNewDoc("1.0");
- doc->children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL);
- xmlSetProp(doc->children, "prop1", "gnome is great");
- xmlSetProp(doc->children, "prop2", "& linux too");
- tree = xmlNewChild(doc->children, NULL, "head", NULL);
- subtree = xmlNewChild(tree, NULL, "title", "Welcome to Gnome");
- tree = xmlNewChild(doc->children, NULL, "chapter", NULL);
- subtree = xmlNewChild(tree, NULL, "title", "The Linux adventure");
- subtree = xmlNewChild(tree, NULL, "p", "bla bla bla ...");
- subtree = xmlNewChild(tree, NULL, "image", NULL);
- xmlSetProp(subtree, "href", "linus.gif");</pre><p>Not really rocket science ...</p><h3><a name="Traversing" id="Traversing">Traversing the tree</a></h3><p>Basically by <a href="html/libxml-tree.html">including "tree.h"</a> your
+ doc = xmlNewDoc("1.0");
+ doc->children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL);
+ xmlSetProp(doc->children, "prop1", "gnome is great");
+ xmlSetProp(doc->children, "prop2", "& linux too");
+ tree = xmlNewChild(doc->children, NULL, "head", NULL);
+ subtree = xmlNewChild(tree, NULL, "title", "Welcome to Gnome");
+ tree = xmlNewChild(doc->children, NULL, "chapter", NULL);
+ subtree = xmlNewChild(tree, NULL, "title", "The Linux adventure");
+ subtree = xmlNewChild(tree, NULL, "p", "bla bla bla ...");
+ subtree = xmlNewChild(tree, NULL, "image", NULL);
+ xmlSetProp(subtree, "href", "linus.gif");</pre><p>Not really rocket science ...</p><h3><a name="Traversing" id="Traversing">Traversing the tree</a></h3><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.
The names should be somewhat simple like <strong>parent</strong>,
<strong>children</strong>, <strong>next</strong>, <strong>prev</strong>,
<strong>properties</strong>, etc... For example, still with the previous
-example:</p><pre><code>doc->children->children->children</code></pre><p>points to the title element,</p><pre>doc->children->children->next->children->children</pre><p>points to the text node containing the chapter title "The Linux
-adventure".</p><p><strong>NOTE</strong>: XML allows <em>PI</em>s and <em>comments</em> to be
+example:</p><pre><code>doc->children->children->children</code></pre><p>points to the title element,</p><pre>doc->children->children->next->children->children</pre><p>points to the text node containing the chapter title "The Linux
+adventure".</p><p><strong>NOTE</strong>: XML allows <em>PI</em>s and <em>comments</em> to be
present before the document root, so <code>doc->children</code> may point
to an element which is not the document Root Element; a function
<code>xmlDocGetRootElement()</code> was added for this purpose.</p><h3><a name="Modifying" id="Modifying">Modifying the tree</a></h3><p>Functions are provided for reading and writing the document content. Here
@@ -101,7 +101,7 @@
</dl><p>Two functions are provided for reading and writing the text associated
with elements:</p><dl><dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar
*value);</code></dt>
- <dd><p>This function takes an "external" string and converts it to one
+ <dd><p>This function takes an "external" string and converts it to one
text node or possibly to a list of entity and text nodes. All
non-predefined entity references like &Gnome; will be stored
internally as entity nodes, hence the result of the function may not be
@@ -115,7 +115,7 @@
argument inLine. If this argument is set to 1, the function will expand
entity references. For example, instead of returning the &Gnome;
XML encoding in the string, it will substitute it with its value (say,
- "GNU Network Object Model Environment").</p>
+ "GNU Network Object Model Environment").</p>
</dd>
</dl><h3><a name="Saving" id="Saving">Saving a tree</a></h3><p>Basically 3 options are possible:</p><dl><dt><code>void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int
*size);</code></dt>