summaryrefslogtreecommitdiff
path: root/doc/library.html
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-07-24 23:47:05 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-07-24 23:47:05 +0000
commit0b28e88eb9285def35d2f1201a932014b717c3d3 (patch)
treefea29a614b18eef38e86f33dddec52a837f724da /doc/library.html
parent8e8a703c767abfd43fdc89794f009a443096236e (diff)
downloadlibxml2-0b28e88eb9285def35d2f1201a932014b717c3d3.tar.gz
applied syntax patch from Rick Jones and rebuilt the web site. Daniel
* doc/xml.html doc/*.html: applied syntax patch from Rick Jones and rebuilt the web site. Daniel
Diffstat (limited to 'doc/library.html')
-rw-r--r--doc/library.html64
1 files changed, 45 insertions, 19 deletions
diff --git a/doc/library.html b/doc/library.html
index ca06abea..50ea7814 100644
--- a/doc/library.html
+++ b/doc/library.html
@@ -103,12 +103,16 @@ documents either from in-memory strings or from files. The functions are
defined in &quot;parser.h&quot;:</p>
<dl>
<dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt>
-<dd><p>Parse a null-terminated string containing the document.</p></dd>
+ <dd>
+<p>Parse a null-terminated string containing the document.</p>
+ </dd>
</dl>
<dl>
<dt><code>xmlDocPtr xmlParseFile(const char *filename);</code></dt>
-<dd><p>Parse an XML document contained in a (possibly compressed)
- file.</p></dd>
+ <dd>
+<p>Parse an XML document contained in a (possibly compressed)
+ file.</p>
+ </dd>
</dl>
<p>The parser returns a pointer to the document structure (or NULL in case of
failure).</p>
@@ -200,52 +204,66 @@ is an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p>
<dl>
<dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const
xmlChar *value);</code></dt>
-<dd><p>This sets (or changes) an attribute carried by an ELEMENT node.
- The value can be NULL.</p></dd>
+ <dd>
+<p>This sets (or changes) an attribute carried by an ELEMENT node.
+ The value can be NULL.</p>
+ </dd>
</dl>
<dl>
<dt><code>const xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar
*name);</code></dt>
-<dd><p>This function returns a pointer to new copy of the property
- content. Note that the user must deallocate the result.</p></dd>
+ <dd>
+<p>This function returns a pointer to new copy of the property
+ content. Note that the user must deallocate the result.</p>
+ </dd>
</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 &quot;external&quot; string and converts it to one
+ <dd>
+<p>This function takes an &quot;external&quot; string and converts it to one
text node or possibly to a list of entity and text nodes. All
non-predefined entity references like &amp;Gnome; will be stored
internally as entity nodes, hence the result of the function may not be
- a single node.</p></dd>
+ a single node.</p>
+ </dd>
</dl>
<dl>
<dt><code>xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int
inLine);</code></dt>
-<dd><p>This function is the inverse of
+ <dd>
+<p>This function is the inverse of
<code>xmlStringGetNodeList()</code>. It generates a new string
containing the content of the text and entity nodes. Note the extra
argument inLine. If this argument is set to 1, the function will expand
entity references. For example, instead of returning the &amp;Gnome;
XML encoding in the string, it will substitute it with its value (say,
- &quot;GNU Network Object Model Environment&quot;).</p></dd>
+ &quot;GNU Network Object Model Environment&quot;).</p>
+ </dd>
</dl>
<h3><a name="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>
-<dd><p>Returns a buffer into which the document has been saved.</p></dd>
+ <dd>
+<p>Returns a buffer into which the document has been saved.</p>
+ </dd>
</dl>
<dl>
<dt><code>extern void xmlDocDump(FILE *f, xmlDocPtr doc);</code></dt>
-<dd><p>Dumps a document to an open file descriptor.</p></dd>
+ <dd>
+<p>Dumps a document to an open file descriptor.</p>
+ </dd>
</dl>
<dl>
<dt><code>int xmlSaveFile(const char *filename, xmlDocPtr cur);</code></dt>
-<dd><p>Saves the document to a file. In this case, the compression
- interface is triggered if it has been turned on.</p></dd>
+ <dd>
+<p>Saves the document to a file. In this case, the compression
+ interface is triggered if it has been turned on.</p>
+ </dd>
</dl>
<h3><a name="Compressio">Compression</a></h3>
<p>The library transparently handles compression when doing file-based
@@ -253,19 +271,27 @@ accesses. The level of compression on saves can be turned on either globally
or individually for one file:</p>
<dl>
<dt><code>int xmlGetDocCompressMode (xmlDocPtr doc);</code></dt>
-<dd><p>Gets the document compression ratio (0-9).</p></dd>
+ <dd>
+<p>Gets the document compression ratio (0-9).</p>
+ </dd>
</dl>
<dl>
<dt><code>void xmlSetDocCompressMode (xmlDocPtr doc, int mode);</code></dt>
-<dd><p>Sets the document compression ratio.</p></dd>
+ <dd>
+<p>Sets the document compression ratio.</p>
+ </dd>
</dl>
<dl>
<dt><code>int xmlGetCompressMode(void);</code></dt>
-<dd><p>Gets the default compression ratio.</p></dd>
+ <dd>
+<p>Gets the default compression ratio.</p>
+ </dd>
</dl>
<dl>
<dt><code>void xmlSetCompressMode(int mode);</code></dt>
-<dd><p>Sets the default compression ratio.</p></dd>
+ <dd>
+<p>Sets the default compression ratio.</p>
+ </dd>
</dl>
<p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td>