blob: 0d7d4061a0a0649e19347cd8a14ecd0e5cd42d67 [file] [log] [blame]
Daniel Veillard1db4a662005-09-12 13:10:09 +00001<?xml version="1.0" encoding="UTF-8"?>
2<html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5 <title>tree: interfaces for tree manipulation</title>
6 <meta name="generator" content="Libxml2 devhelp stylesheet"/>
7 <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
8 <link rel="up" href="general.html" title="API"/>
9 <link rel="stylesheet" href="style.css" type="text/css"/>
10 <link rel="chapter" href="general.html" title="API"/>
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
14 <tr valign="middle">
15 <td>
16 <a accesskey="p" href="libxml2-threads.html">
17 <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
18 </a>
19 </td>
20 <td>
21 <a accesskey="u" href="general.html">
22 <img src="up.png" width="24" height="24" border="0" alt="Up"/>
23 </a>
24 </td>
25 <td>
26 <a accesskey="h" href="index.html">
27 <img src="home.png" width="24" height="24" border="0" alt="Home"/>
28 </a>
29 </td>
30 <td>
31 <a accesskey="n" href="libxml2-uri.html">
32 <img src="right.png" width="24" height="24" border="0" alt="Next"/>
33 </a>
34 </td>
35 <th width="100%" align="center">libxml2 Reference Manual</th>
36 </tr>
37 </table>
38 <h2>
39 <span class="refentrytitle">tree</span>
40 </h2>
41 <p>tree - interfaces for tree manipulation</p>
42 <p>this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree </p>
43 <p>Author(s): Daniel Veillard </p>
44 <div class="refsynopsisdiv">
45 <h2>Synopsis</h2>
46 <pre class="synopsis">#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a>;
Daniel Veillard28cc42d2012-08-10 10:00:18 +080047#define <a href="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a>;
Daniel Veillard1db4a662005-09-12 13:10:09 +000048#define <a href="#XML_XML_ID">XML_XML_ID</a>;
49#define <a href="#xmlRootNode">xmlRootNode</a>;
50#define <a href="#XML_GET_LINE">XML_GET_LINE</a>;
51#define <a href="#XML_GET_CONTENT">XML_GET_CONTENT</a>;
52#define <a href="#xmlChildrenNode">xmlChildrenNode</a>;
Daniel Veillard28cc42d2012-08-10 10:00:18 +080053#define <a href="#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a>;
54#define <a href="#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a>;
Daniel Veillard1db4a662005-09-12 13:10:09 +000055typedef struct _xmlNs <a href="#xmlNs">xmlNs</a>;
Daniel Veillard28cc42d2012-08-10 10:00:18 +080056typedef struct _xmlElementContent <a href="#xmlElementContent">xmlElementContent</a>;
Daniel Veillard1db4a662005-09-12 13:10:09 +000057typedef <a href="libxml2-tree.html#xmlEnumeration">xmlEnumeration</a> * <a href="#xmlEnumerationPtr">xmlEnumerationPtr</a>;
58typedef struct _xmlBuffer <a href="#xmlBuffer">xmlBuffer</a>;
59typedef <a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> * <a href="#xmlParserInputPtr">xmlParserInputPtr</a>;
60typedef <a href="libxml2-tree.html#xmlSAXLocator">xmlSAXLocator</a> * <a href="#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a>;
61typedef struct _xmlParserInput <a href="#xmlParserInput">xmlParserInput</a>;
62typedef struct _xmlElement <a href="#xmlElement">xmlElement</a>;
63typedef <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> <a href="#xmlNsType">xmlNsType</a>;
64typedef enum <a href="#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a>;
65typedef struct _xmlNode <a href="#xmlNode">xmlNode</a>;
66typedef <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * <a href="#xmlDocPtr">xmlDocPtr</a>;
Daniel Veillard28cc42d2012-08-10 10:00:18 +080067typedef <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * <a href="#xmlBufferPtr">xmlBufferPtr</a>;
Daniel Veillard1db4a662005-09-12 13:10:09 +000068typedef <a href="libxml2-tree.html#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a> * <a href="#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a>;
69typedef <a href="libxml2-tree.html#xmlRef">xmlRef</a> * <a href="#xmlRefPtr">xmlRefPtr</a>;
70typedef struct _xmlParserInputBuffer <a href="#xmlParserInputBuffer">xmlParserInputBuffer</a>;
71typedef struct _xmlRef <a href="#xmlRef">xmlRef</a>;
72typedef struct _xmlDOMWrapCtxt <a href="#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a>;
73typedef <a href="libxml2-tree.html#xmlNode">xmlNode</a> * <a href="#xmlNodePtr">xmlNodePtr</a>;
74typedef struct _xmlParserCtxt <a href="#xmlParserCtxt">xmlParserCtxt</a>;
75typedef <a href="libxml2-tree.html#xmlDtd">xmlDtd</a> * <a href="#xmlDtdPtr">xmlDtdPtr</a>;
76typedef enum <a href="#xmlAttributeDefault">xmlAttributeDefault</a>;
Daniel Veillard28cc42d2012-08-10 10:00:18 +080077typedef struct _xmlBuf <a href="#xmlBuf">xmlBuf</a>;
Daniel Veillard1db4a662005-09-12 13:10:09 +000078typedef struct _xmlNotation <a href="#xmlNotation">xmlNotation</a>;
79typedef enum <a href="#xmlElementType">xmlElementType</a>;
80typedef struct _xmlEntity <a href="#xmlEntity">xmlEntity</a>;
81typedef struct _xmlAttr <a href="#xmlAttr">xmlAttr</a>;
82typedef <a href="libxml2-tree.html#xmlAttribute">xmlAttribute</a> * <a href="#xmlAttributePtr">xmlAttributePtr</a>;
83typedef enum <a href="#xmlElementTypeVal">xmlElementTypeVal</a>;
84typedef <a href="libxml2-tree.html#xmlNotation">xmlNotation</a> * <a href="#xmlNotationPtr">xmlNotationPtr</a>;
85typedef <a href="libxml2-tree.html#xmlElement">xmlElement</a> * <a href="#xmlElementPtr">xmlElementPtr</a>;
Daniel Veillard28cc42d2012-08-10 10:00:18 +080086typedef <a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * <a href="#xmlBufPtr">xmlBufPtr</a>;
Daniel Veillard1db4a662005-09-12 13:10:09 +000087typedef enum <a href="#xmlElementContentOccur">xmlElementContentOccur</a>;
88typedef <a href="libxml2-tree.html#xmlAttr">xmlAttr</a> * <a href="#xmlAttrPtr">xmlAttrPtr</a>;
89typedef struct _xmlDoc <a href="#xmlDoc">xmlDoc</a>;
90typedef struct _xmlID <a href="#xmlID">xmlID</a>;
91typedef <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> * <a href="#xmlParserCtxtPtr">xmlParserCtxtPtr</a>;
92typedef <a href="libxml2-tree.html#xmlEntity">xmlEntity</a> * <a href="#xmlEntityPtr">xmlEntityPtr</a>;
93typedef struct _xmlEnumeration <a href="#xmlEnumeration">xmlEnumeration</a>;
94typedef enum <a href="#xmlAttributeType">xmlAttributeType</a>;
95typedef <a href="libxml2-tree.html#xmlNs">xmlNs</a> * <a href="#xmlNsPtr">xmlNsPtr</a>;
96typedef <a href="libxml2-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> * <a href="#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a>;
97typedef struct _xmlSAXHandler <a href="#xmlSAXHandler">xmlSAXHandler</a>;
98typedef struct _xmlOutputBuffer <a href="#xmlOutputBuffer">xmlOutputBuffer</a>;
99typedef struct _xmlSAXLocator <a href="#xmlSAXLocator">xmlSAXLocator</a>;
100typedef <a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * <a href="#xmlElementContentPtr">xmlElementContentPtr</a>;
101typedef enum <a href="#xmlElementContentType">xmlElementContentType</a>;
Daniel Veillard2cba4152008-08-27 11:45:41 +0000102typedef enum <a href="#xmlDocProperties">xmlDocProperties</a>;
Daniel Veillard1db4a662005-09-12 13:10:09 +0000103typedef <a href="libxml2-tree.html#xmlID">xmlID</a> * <a href="#xmlIDPtr">xmlIDPtr</a>;
104typedef struct _xmlDtd <a href="#xmlDtd">xmlDtd</a>;
105typedef struct _xmlAttribute <a href="#xmlAttribute">xmlAttribute</a>;
106typedef <a href="libxml2-tree.html#xmlOutputBuffer">xmlOutputBuffer</a> * <a href="#xmlOutputBufferPtr">xmlOutputBufferPtr</a>;
107typedef <a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * <a href="#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a>;
108<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocCopyNode">xmlDocCopyNode</a> (const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int extended);
109<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocRawNode">xmlNewDocRawNode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800110<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufContent">xmlBufContent</a> (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000111<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewNsPropEatName">xmlNewNsPropEatName</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800112<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlStringGetNodeList">xmlStringGetNodeList</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000113<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewCDataBlock">xmlNewCDataBlock</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
114void <a href="#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string);
115<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetBase">xmlNodeGetBase</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
116void <a href="#xmlBufferEmpty">xmlBufferEmpty</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
117<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBuildQName">xmlBuildQName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ncname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * memory, <br/> int len);
Daniel Veillardc943f702012-05-23 17:10:59 +0800118int <a href="#xmlValidateNMToken">xmlValidateNMToken</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000119int <a href="#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format);
120<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddSibling">xmlAddSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
121<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreate">xmlBufferCreate</a> (void);
122<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocFragment">xmlNewDocFragment</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
123<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocGetRootElement">xmlDocGetRootElement</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800124<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetProp">xmlGetProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000125int <a href="#xmlValidateName">xmlValidateName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space);
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800126<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufEnd">xmlBufEnd</a> (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000127int <a href="#xmlValidateQName">xmlValidateQName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space);
128<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlHasNsProp">xmlHasNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace);
129<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddPrevSibling">xmlAddPrevSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
130int <a href="#xmlBufferAddHead">xmlBufferAddHead</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len);
131<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewPI">xmlNewPI</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
132void <a href="#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br/> int * doc_txt_len, <br/> const char * txt_encoding, <br/> int format);
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800133<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlSetProp">xmlSetProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +0000134unsigned long <a href="#xmlChildElementCount">xmlChildElementCount</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000135void <a href="#xmlElemDump">xmlElemDump</a> (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
136int <a href="#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format);
137<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlGetIntSubset">xmlGetIntSubset</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
138int <a href="#xmlNodeBufGetContent">xmlNodeBufGetContent</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +0000139<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNextElementSibling">xmlNextElementSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000140void <a href="#xmlBufferWriteChar">xmlBufferWriteChar</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const char * string);
141void <a href="#xmlBufferFree">xmlBufferFree</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
Daniel Veillardd463c992006-02-23 22:07:59 +0000142int <a href="#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * resNode, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br/> int deep, <br/> int options);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000143<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewNode">xmlNewNode</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
144int <a href="#xmlSaveFileTo">xmlSaveFileTo</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding);
145<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewTextLen">xmlNewTextLen</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
146<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewTextChild">xmlNewTextChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
147void <a href="#xmlNodeSetContent">xmlNodeSetContent</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
148int <a href="#xmlBufferAdd">xmlBufferAdd</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len);
149void <a href="#xmlNodeDumpOutput">xmlNodeDumpOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format, <br/> const char * encoding);
150<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlCopyNamespace">xmlCopyNamespace</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur);
151<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlSearchNsByHref">xmlSearchNsByHref</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href);
152<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddChild">xmlAddChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
153int <a href="#xmlReconciliateNs">xmlReconciliateNs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree);
154int <a href="#xmlValidateNCName">xmlValidateNCName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space);
155<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocComment">xmlNewDocComment</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
156int <a href="#xmlGetCompressMode">xmlGetCompressMode</a> (void);
157int <a href="#xmlNodeDump">xmlNodeDump</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format);
158<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreateSize">xmlBufferCreateSize</a> (size_t size);
159<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeListGetString">xmlNodeListGetString</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br/> int inLine);
160void <a href="#xmlSetCompressMode">xmlSetCompressMode</a> (int mode);
161void <a href="#xmlSetTreeDoc">xmlSetTreeDoc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
162int <a href="#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br/> int options);
163<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlCopyNodeList">xmlCopyNodeList</a> (const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
164<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
165<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddChildList">xmlAddChildList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
166<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNodePath">xmlGetNodePath</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
167void <a href="#xmlFreePropList">xmlFreePropList</a> (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
168void <a href="#xmlNodeAddContent">xmlNodeAddContent</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +0000169int <a href="#xmlUnsetNsProp">xmlUnsetNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
170<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlFirstElementChild">xmlFirstElementChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000171<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddNextSibling">xmlAddNextSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
172int <a href="#xmlIsBlankNode">xmlIsBlankNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
173<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlNewGlobalNs">xmlNewGlobalNs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
174int <a href="#xmlBufferDump">xmlBufferDump</a> (FILE * file, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
175<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetContent">xmlNodeGetContent</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
176<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCopyDoc">xmlCopyDoc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int recursive);
177<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> <a href="#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a> (void);
178void <a href="#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br/> int * doc_txt_len, <br/> const char * txt_encoding);
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800179int <a href="#xmlBufGetNodeContent">xmlBufGetNodeContent</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000180<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextMerge">xmlTextMerge</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> first, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> second);
181void <a href="#xmlDocDumpMemory">xmlDocDumpMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size);
182<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocPI">xmlNewDocPI</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
183void <a href="#xmlFreeNs">xmlFreeNs</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur);
184int <a href="#xmlDocDump">xmlDocDump</a> (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
185void <a href="#xmlFreeProp">xmlFreeProp</a> (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
186<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNoNsProp">xmlGetNoNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
187<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName2">xmlSplitQName2</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix);
188<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewProp">xmlNewProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
189int <a href="#xmlTextConcat">xmlTextConcat</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
190int <a href="#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
191int <a href="#xmlBufferShrink">xmlBufferShrink</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int len);
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +0000192<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlPreviousElementSibling">xmlPreviousElementSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000193void <a href="#xmlNodeSetContentLen">xmlNodeSetContentLen</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
194void <a href="#xmlNodeAddContentLen">xmlNodeAddContentLen</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
195void <a href="#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string);
196<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlCopyProp">xmlCopyProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
197<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlReplaceNode">xmlReplaceNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> old, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
198void <a href="#xmlSetDocCompressMode">xmlSetDocCompressMode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int mode);
199<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlCopyNode">xmlCopyNode</a> (const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int extended);
200void <a href="#xmlUnlinkNode">xmlUnlinkNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
201const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName3">xmlSplitQName3</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int * len);
Daniel Veillard6f9b0872006-08-12 14:09:01 +0000202typedef <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsPrefix);
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800203size_t <a href="#xmlBufUse">xmlBufUse</a> (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000204<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocSetRootElement">xmlDocSetRootElement</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> root);
205long <a href="#xmlGetLineNo">xmlGetLineNo</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
206const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufferContent">xmlBufferContent</a> (const <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
207int <a href="#xmlRemoveProp">xmlRemoveProp</a> (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +0000208<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlLastElementChild">xmlLastElementChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000209<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetLang">xmlNodeGetLang</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
210int <a href="#xmlGetDocCompressMode">xmlGetDocCompressMode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800211size_t <a href="#xmlBufNodeDump">xmlBufNodeDump</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000212<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNsProp">xmlGetNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace);
213<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewDocProp">xmlNewDocProp</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
214void <a href="#xmlFreeNode">xmlFreeNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
215<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewNsProp">xmlNewNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
216void <a href="#xmlDOMWrapFreeCtxt">xmlDOMWrapFreeCtxt</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt);
Daniel Veillardc943f702012-05-23 17:10:59 +0800217<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufferDetach">xmlBufferDetach</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000218void <a href="#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme);
219<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewChild">xmlNewChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
220<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlSearchNs">xmlSearchNs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace);
221<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len);
222int <a href="#xmlSaveFormatFile">xmlSaveFormatFile</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> int format);
223<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlCopyPropList">xmlCopyPropList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
224int <a href="#xmlDocFormatDump">xmlDocFormatDump</a> (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> int format);
225void <a href="#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int val);
226<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlHasProp">xmlHasProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
227int <a href="#xmlBufferCat">xmlBufferCat</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
228<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlCreateIntSubset">xmlCreateIntSubset</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
229<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlNewDoc">xmlNewDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version);
230<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewCharRef">xmlNewCharRef</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
231<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlCopyNamespaceList">xmlCopyNamespaceList</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur);
232<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewNodeEatName">xmlNewNodeEatName</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
233int <a href="#xmlBufferResize">xmlBufferResize</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int size);
234void <a href="#xmlNodeSetBase">xmlNodeSetBase</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * uri);
235<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewComment">xmlNewComment</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
236int <a href="#xmlBufferLength">xmlBufferLength</a> (const <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
237<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewText">xmlNewText</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
238int <a href="#xmlUnsetProp">xmlUnsetProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
239<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> <a href="#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a> (void);
240int <a href="#xmlSaveFile">xmlSaveFile</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
241<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocCopyNodeList">xmlDocCopyNodeList</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
242void <a href="#xmlSetNs">xmlSetNs</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns);
243<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlNewNs">xmlNewNs</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
244int <a href="#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int options);
245void <a href="#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string);
246<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlCopyDtd">xmlCopyDtd</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd);
247<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocText">xmlNewDocText</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
248<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeListGetRawString">xmlNodeListGetRawString</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br/> int inLine);
249<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreateStatic">xmlBufferCreateStatic</a> (void * mem, <br/> size_t size);
250<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewReference">xmlNewReference</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
251int <a href="#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> int options);
252int <a href="#xmlBufferCCat">xmlBufferCCat</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const char * str);
253<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * <a href="#xmlGetNsList">xmlGetNsList</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
254int <a href="#xmlBufferGrow">xmlBufferGrow</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int len);
255int <a href="#xmlNodeIsText">xmlNodeIsText</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800256void <a href="#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a> (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme);
Daniel Veillard1db4a662005-09-12 13:10:09 +0000257int <a href="#xmlIsXHTML">xmlIsXHTML</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicID);
258void <a href="#xmlNodeSetLang">xmlNodeSetLang</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * lang);
259void <a href="#xmlFreeDtd">xmlFreeDtd</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> cur);
260void <a href="#xmlFreeNodeList">xmlFreeNodeList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
261void <a href="#xmlFreeDoc">xmlFreeDoc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
262<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocNode">xmlNewDocNode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
263int <a href="#xmlSaveFileEnc">xmlSaveFileEnc</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding);
264<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlSetNsProp">xmlSetNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
265void <a href="#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format);
266void <a href="#xmlSetListDoc">xmlSetListDoc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
267void <a href="#xmlNodeSetName">xmlNodeSetName</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
268<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocTextLen">xmlNewDocTextLen</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
269<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlNewDtd">xmlNewDtd</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
270void <a href="#xmlFreeNsList">xmlFreeNsList</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur);
271<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlGetLastChild">xmlGetLastChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
272</pre>
273 </div>
274 <div class="refsect1" lang="en">
275 <h2>Description</h2>
276 </div>
277 <div class="refsect1" lang="en">
278 <h2>Details</h2>
279 <div class="refsect2" lang="en">
280 <div class="refsect2" lang="en"><h3><a name="BASE_BUFFER_SIZE">Macro </a>BASE_BUFFER_SIZE</h3><pre class="programlisting">#define <a href="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a>;
281</pre><p>default buffer size 4000.</p>
282</div>
283 <hr/>
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800284 <div class="refsect2" lang="en"><h3><a name="LIBXML2_NEW_BUFFER">Macro </a>LIBXML2_NEW_BUFFER</h3><pre class="programlisting">#define <a href="#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a>;
285</pre><p>Macro used to express that the API use the new buffers for <a href="libxml2-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> and xmlOutputBuffer. The change was introduced in 2.9.0.</p>
286</div>
287 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +0000288 <div class="refsect2" lang="en"><h3><a name="XML_GET_CONTENT">Macro </a>XML_GET_CONTENT</h3><pre class="programlisting">#define <a href="#XML_GET_CONTENT">XML_GET_CONTENT</a>;
289</pre><p>Macro to extract the content pointer of a node.</p>
290</div>
291 <hr/>
292 <div class="refsect2" lang="en"><h3><a name="XML_GET_LINE">Macro </a>XML_GET_LINE</h3><pre class="programlisting">#define <a href="#XML_GET_LINE">XML_GET_LINE</a>;
293</pre><p>Macro to extract the line number of an element node.</p>
294</div>
295 <hr/>
296 <div class="refsect2" lang="en"><h3><a name="XML_LOCAL_NAMESPACE">Macro </a>XML_LOCAL_NAMESPACE</h3><pre class="programlisting">#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a>;
297</pre><p>A namespace declaration node.</p>
298</div>
299 <hr/>
300 <div class="refsect2" lang="en"><h3><a name="XML_XML_ID">Macro </a>XML_XML_ID</h3><pre class="programlisting">#define <a href="#XML_XML_ID">XML_XML_ID</a>;
301</pre><p>This is the name for the special xml:id <a href="libxml2-SAX.html#attribute">attribute</a></p>
302</div>
303 <hr/>
304 <div class="refsect2" lang="en"><h3><a name="XML_XML_NAMESPACE">Macro </a>XML_XML_NAMESPACE</h3><pre class="programlisting">#define <a href="#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a>;
305</pre><p>This is the namespace for the special xml: prefix predefined in the XML Namespace specification.</p>
306</div>
307 <hr/>
308 <div class="refsect2" lang="en"><h3><a name="xmlChildrenNode">Macro </a>xmlChildrenNode</h3><pre class="programlisting">#define <a href="#xmlChildrenNode">xmlChildrenNode</a>;
309</pre><p>Macro for compatibility naming layer with libxml1. Maps to "children."</p>
310</div>
311 <hr/>
312 <div class="refsect2" lang="en"><h3><a name="xmlRootNode">Macro </a>xmlRootNode</h3><pre class="programlisting">#define <a href="#xmlRootNode">xmlRootNode</a>;
313</pre><p>Macro for compatibility naming layer with libxml1. Maps to "children".</p>
314</div>
315 <hr/>
316 <div class="refsect2" lang="en"><h3><a name="xmlAttr">Structure </a>xmlAttr</h3><pre class="programlisting">struct _xmlAttr {
317 void * _private : application data
318 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ATTRIBUTE_NODE, must be second !
319 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the property
320 struct _xmlNode * children : the value of the property
321 struct _xmlNode * last : NULL
322 struct _xmlNode * parent : child-&gt;parent link
323 struct _xmlAttr * next : next sibling link
324 struct _xmlAttr * prev : previous sibling link
325 struct _xmlDoc * doc : the containing document
326 <a href="libxml2-tree.html#xmlNs">xmlNs</a> * ns : pointer to the associated namespace
327 <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> atype : the <a href="libxml2-SAX.html#attribute">attribute</a> type if validating
328 void * psvi : for type/PSVI informations
329} xmlAttr;
330</pre><p/>
331</div>
332 <hr/>
333 <div class="refsect2" lang="en"><h3><a name="xmlAttrPtr">Typedef </a>xmlAttrPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttr">xmlAttr</a> * xmlAttrPtr;
334</pre><p/>
335</div>
336 <hr/>
337 <div class="refsect2" lang="en"><h3><a name="xmlAttribute">Structure </a>xmlAttribute</h3><pre class="programlisting">struct _xmlAttribute {
338 void * _private : application data
339 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ATTRIBUTE_DECL, must be second !
340 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Attribute name
341 struct _xmlNode * children : NULL
342 struct _xmlNode * last : NULL
343 struct _xmlDtd * parent : -&gt; DTD
344 struct _xmlNode * next : next sibling link
345 struct _xmlNode * prev : previous sibling link
346 struct _xmlDoc * doc : the containing document
347 struct _xmlAttribute * nexth : next in hash table
348 <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> atype : The <a href="libxml2-SAX.html#attribute">attribute</a> type
349 <a href="libxml2-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def : the default
350 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue : or the default value
351 <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree : or the enumeration tree if any
352 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : the namespace prefix if any
353 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem : Element holding the <a href="libxml2-SAX.html#attribute">attribute</a>
354} xmlAttribute;
355</pre><p/>
356</div>
357 <hr/>
358 <div class="refsect2" lang="en"><h3><a name="xmlAttributeDefault">Enum </a>xmlAttributeDefault</h3><pre class="programlisting">enum <a href="#xmlAttributeDefault">xmlAttributeDefault</a> {
359 <a name="XML_ATTRIBUTE_NONE">XML_ATTRIBUTE_NONE</a> = 1
360 <a name="XML_ATTRIBUTE_REQUIRED">XML_ATTRIBUTE_REQUIRED</a> = 2
361 <a name="XML_ATTRIBUTE_IMPLIED">XML_ATTRIBUTE_IMPLIED</a> = 3
362 <a name="XML_ATTRIBUTE_FIXED">XML_ATTRIBUTE_FIXED</a> = 4
363};
364</pre><p/>
365</div>
366 <hr/>
367 <div class="refsect2" lang="en"><h3><a name="xmlAttributePtr">Typedef </a>xmlAttributePtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttribute">xmlAttribute</a> * xmlAttributePtr;
368</pre><p/>
369</div>
370 <hr/>
371 <div class="refsect2" lang="en"><h3><a name="xmlAttributeType">Enum </a>xmlAttributeType</h3><pre class="programlisting">enum <a href="#xmlAttributeType">xmlAttributeType</a> {
372 <a name="XML_ATTRIBUTE_CDATA">XML_ATTRIBUTE_CDATA</a> = 1
373 <a name="XML_ATTRIBUTE_ID">XML_ATTRIBUTE_ID</a> = 2
374 <a name="XML_ATTRIBUTE_IDREF">XML_ATTRIBUTE_IDREF</a> = 3
375 <a name="XML_ATTRIBUTE_IDREFS">XML_ATTRIBUTE_IDREFS</a> = 4
376 <a name="XML_ATTRIBUTE_ENTITY">XML_ATTRIBUTE_ENTITY</a> = 5
377 <a name="XML_ATTRIBUTE_ENTITIES">XML_ATTRIBUTE_ENTITIES</a> = 6
378 <a name="XML_ATTRIBUTE_NMTOKEN">XML_ATTRIBUTE_NMTOKEN</a> = 7
379 <a name="XML_ATTRIBUTE_NMTOKENS">XML_ATTRIBUTE_NMTOKENS</a> = 8
380 <a name="XML_ATTRIBUTE_ENUMERATION">XML_ATTRIBUTE_ENUMERATION</a> = 9
381 <a name="XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a> = 10
382};
383</pre><p/>
384</div>
385 <hr/>
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800386 <div class="refsect2" lang="en"><h3><a name="xmlBuf">Structure </a>xmlBuf</h3><pre class="programlisting">struct _xmlBuf {
387The content of this structure is not made public by the API.
388} xmlBuf;
389</pre><p/>
390</div>
391 <hr/>
392 <div class="refsect2" lang="en"><h3><a name="xmlBufPtr">Typedef </a>xmlBufPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * xmlBufPtr;
393</pre><p>A pointer to a buffer structure, the actual structure internals are not public</p>
394</div>
395 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +0000396 <div class="refsect2" lang="en"><h3><a name="xmlBuffer">Structure </a>xmlBuffer</h3><pre class="programlisting">struct _xmlBuffer {
397 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content : The buffer content UTF8
398 unsigned int use : The buffer size used
399 unsigned int size : The buffer size
400 <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> alloc : The realloc method
Daniel Veillard15724252008-08-30 15:01:04 +0000401 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * contentIO : in IO mode we may have a different base
Daniel Veillard1db4a662005-09-12 13:10:09 +0000402} xmlBuffer;
403</pre><p/>
404</div>
405 <hr/>
406 <div class="refsect2" lang="en"><h3><a name="xmlBufferAllocationScheme">Enum </a>xmlBufferAllocationScheme</h3><pre class="programlisting">enum <a href="#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> {
Daniel Veillard15724252008-08-30 15:01:04 +0000407 <a name="XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> = 1 /* double each time one need to grow */
408 <a name="XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> = 2 /* grow only to the minimal size */
409 <a name="XML_BUFFER_ALLOC_IMMUTABLE">XML_BUFFER_ALLOC_IMMUTABLE</a> = 3 /* immutable buffer */
Daniel Veillardc943f702012-05-23 17:10:59 +0800410 <a name="XML_BUFFER_ALLOC_IO">XML_BUFFER_ALLOC_IO</a> = 4 /* special allocation scheme used for I/O */
411 <a name="XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> = 5 /* exact up to a threshold, and doubleit thereafter */
Daniel Veillard1db4a662005-09-12 13:10:09 +0000412};
413</pre><p/>
414</div>
415 <hr/>
416 <div class="refsect2" lang="en"><h3><a name="xmlBufferPtr">Typedef </a>xmlBufferPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * xmlBufferPtr;
417</pre><p/>
418</div>
419 <hr/>
420 <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapCtxt">Structure </a>xmlDOMWrapCtxt</h3><pre class="programlisting">struct _xmlDOMWrapCtxt {
Daniel Veillard6f9b0872006-08-12 14:09:01 +0000421 void * _private : * The type of this context, just in case we need specialized * context
422 int type : * Internal namespace map used for various operations. *
423 void * namespaceMap : * Use this one to acquire an <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> intended for node-&gt;ns. * (Note t
424 <a href="libxml2-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a> getNsForNodeFunc
Daniel Veillard1db4a662005-09-12 13:10:09 +0000425} xmlDOMWrapCtxt;
426</pre><p/>
427</div>
428 <hr/>
429 <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapCtxtPtr">Typedef </a>xmlDOMWrapCtxtPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a> * xmlDOMWrapCtxtPtr;
430</pre><p/>
431</div>
432 <hr/>
433 <div class="refsect2" lang="en"><h3><a name="xmlDoc">Structure </a>xmlDoc</h3><pre class="programlisting">struct _xmlDoc {
434 void * _private : application data
435 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_DOCUMENT_NODE, must be second !
436 char * name : name/filename/URI of the document
437 struct _xmlNode * children : the document tree
438 struct _xmlNode * last : last child link
439 struct _xmlNode * parent : child-&gt;parent link
440 struct _xmlNode * next : next sibling link
441 struct _xmlNode * prev : previous sibling link
442 struct _xmlDoc * doc : autoreference to itself End of common part
443 int compression : level of zlib compression
Daniel Veillardfde5b0b2007-02-12 17:31:53 +0000444 int standalone : standalone document (no external refs) 1 if standalone="yes" 0 if sta
Daniel Veillard1db4a662005-09-12 13:10:09 +0000445 struct _xmlDtd * intSubset : the document internal subset
446 struct _xmlDtd * extSubset : the document external subset
447 struct _xmlNs * oldNs : Global namespace, the old way
448 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version : the XML version string
449 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding : external initial encoding, if any
450 void * ids : Hash table for ID attributes if any
451 void * refs : Hash table for IDREFs attributes if any
452 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL : The URI for that document
453 int charset : encoding of the in-memory content actually an <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a>
454 struct _xmlDict * dict : dict used to allocate names or NULL
455 void * psvi : for type/PSVI informations
Daniel Veillard2cba4152008-08-27 11:45:41 +0000456 int parseFlags : set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used to parse the document
457 int properties : set of <a href="libxml2-tree.html#xmlDocProperties">xmlDocProperties</a> for this document set at the end of parsing
Daniel Veillard1db4a662005-09-12 13:10:09 +0000458} xmlDoc;
459</pre><p/>
460</div>
461 <hr/>
Daniel Veillard2cba4152008-08-27 11:45:41 +0000462 <div class="refsect2" lang="en"><h3><a name="xmlDocProperties">Enum </a>xmlDocProperties</h3><pre class="programlisting">enum <a href="#xmlDocProperties">xmlDocProperties</a> {
463 <a name="XML_DOC_WELLFORMED">XML_DOC_WELLFORMED</a> = 1 /* document is XML well formed */
464 <a name="XML_DOC_NSVALID">XML_DOC_NSVALID</a> = 2 /* document is Namespace valid */
465 <a name="XML_DOC_OLD10">XML_DOC_OLD10</a> = 4 /* parsed with old XML-1.0 parser */
466 <a name="XML_DOC_DTDVALID">XML_DOC_DTDVALID</a> = 8 /* DTD validation was successful */
467 <a name="XML_DOC_XINCLUDE">XML_DOC_XINCLUDE</a> = 16 /* XInclude substitution was done */
468 <a name="XML_DOC_USERBUILT">XML_DOC_USERBUILT</a> = 32 /* Document was built using the API and not by parsing an instance */
469 <a name="XML_DOC_INTERNAL">XML_DOC_INTERNAL</a> = 64 /* built for internal processing */
470 <a name="XML_DOC_HTML">XML_DOC_HTML</a> = 128 /* parsed or built HTML document */
471};
472</pre><p/>
473</div>
474 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +0000475 <div class="refsect2" lang="en"><h3><a name="xmlDocPtr">Typedef </a>xmlDocPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * xmlDocPtr;
476</pre><p/>
477</div>
478 <hr/>
479 <div class="refsect2" lang="en"><h3><a name="xmlDtd">Structure </a>xmlDtd</h3><pre class="programlisting">struct _xmlDtd {
480 void * _private : application data
481 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_DTD_NODE, must be second !
482 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Name of the DTD
483 struct _xmlNode * children : the value of the property link
484 struct _xmlNode * last : last child link
485 struct _xmlDoc * parent : child-&gt;parent link
486 struct _xmlNode * next : next sibling link
487 struct _xmlNode * prev : previous sibling link
488 struct _xmlDoc * doc : the containing document End of common part
489 void * notations : Hash table for notations if any
490 void * elements : Hash table for elements if any
491 void * attributes : Hash table for attributes if any
492 void * entities : Hash table for entities if any
493 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID : External identifier for PUBLIC DTD
494 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID : URI for a SYSTEM or PUBLIC DTD
495 void * pentities : Hash table for param entities if any
496} xmlDtd;
497</pre><p/>
498</div>
499 <hr/>
500 <div class="refsect2" lang="en"><h3><a name="xmlDtdPtr">Typedef </a>xmlDtdPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtd">xmlDtd</a> * xmlDtdPtr;
501</pre><p/>
502</div>
503 <hr/>
504 <div class="refsect2" lang="en"><h3><a name="xmlElement">Structure </a>xmlElement</h3><pre class="programlisting">struct _xmlElement {
505 void * _private : application data
506 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ELEMENT_DECL, must be second !
507 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Element name
508 struct _xmlNode * children : NULL
509 struct _xmlNode * last : NULL
510 struct _xmlDtd * parent : -&gt; DTD
511 struct _xmlNode * next : next sibling link
512 struct _xmlNode * prev : previous sibling link
513 struct _xmlDoc * doc : the containing document
514 <a href="libxml2-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> etype : The type
515 <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content : the allowed element content
516 <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> attributes : List of the declared attributes
517 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : the namespace prefix if any
518 <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : the validating regexp
519 void * contModel
520} xmlElement;
521</pre><p/>
522</div>
523 <hr/>
524 <div class="refsect2" lang="en"><h3><a name="xmlElementContent">Structure </a>xmlElementContent</h3><pre class="programlisting">struct _xmlElementContent {
525 <a href="libxml2-tree.html#xmlElementContentType">xmlElementContentType</a> type : PCDATA, ELEMENT, SEQ or OR
526 <a href="libxml2-tree.html#xmlElementContentOccur">xmlElementContentOccur</a> ocur : ONCE, OPT, MULT or PLUS
527 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Element name
528 struct _xmlElementContent * c1 : first child
529 struct _xmlElementContent * c2 : second child
530 struct _xmlElementContent * parent : parent
531 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : Namespace prefix
532} xmlElementContent;
533</pre><p/>
534</div>
535 <hr/>
536 <div class="refsect2" lang="en"><h3><a name="xmlElementContentOccur">Enum </a>xmlElementContentOccur</h3><pre class="programlisting">enum <a href="#xmlElementContentOccur">xmlElementContentOccur</a> {
537 <a name="XML_ELEMENT_CONTENT_ONCE">XML_ELEMENT_CONTENT_ONCE</a> = 1
538 <a name="XML_ELEMENT_CONTENT_OPT">XML_ELEMENT_CONTENT_OPT</a> = 2
539 <a name="XML_ELEMENT_CONTENT_MULT">XML_ELEMENT_CONTENT_MULT</a> = 3
540 <a name="XML_ELEMENT_CONTENT_PLUS">XML_ELEMENT_CONTENT_PLUS</a> = 4
541};
542</pre><p/>
543</div>
544 <hr/>
545 <div class="refsect2" lang="en"><h3><a name="xmlElementContentPtr">Typedef </a>xmlElementContentPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * xmlElementContentPtr;
546</pre><p/>
547</div>
548 <hr/>
549 <div class="refsect2" lang="en"><h3><a name="xmlElementContentType">Enum </a>xmlElementContentType</h3><pre class="programlisting">enum <a href="#xmlElementContentType">xmlElementContentType</a> {
550 <a name="XML_ELEMENT_CONTENT_PCDATA">XML_ELEMENT_CONTENT_PCDATA</a> = 1
551 <a name="XML_ELEMENT_CONTENT_ELEMENT">XML_ELEMENT_CONTENT_ELEMENT</a> = 2
552 <a name="XML_ELEMENT_CONTENT_SEQ">XML_ELEMENT_CONTENT_SEQ</a> = 3
553 <a name="XML_ELEMENT_CONTENT_OR">XML_ELEMENT_CONTENT_OR</a> = 4
554};
555</pre><p/>
556</div>
557 <hr/>
558 <div class="refsect2" lang="en"><h3><a name="xmlElementPtr">Typedef </a>xmlElementPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElement">xmlElement</a> * xmlElementPtr;
559</pre><p/>
560</div>
561 <hr/>
562 <div class="refsect2" lang="en"><h3><a name="xmlElementType">Enum </a>xmlElementType</h3><pre class="programlisting">enum <a href="#xmlElementType">xmlElementType</a> {
563 <a name="XML_ELEMENT_NODE">XML_ELEMENT_NODE</a> = 1
564 <a name="XML_ATTRIBUTE_NODE">XML_ATTRIBUTE_NODE</a> = 2
565 <a name="XML_TEXT_NODE">XML_TEXT_NODE</a> = 3
566 <a name="XML_CDATA_SECTION_NODE">XML_CDATA_SECTION_NODE</a> = 4
567 <a name="XML_ENTITY_REF_NODE">XML_ENTITY_REF_NODE</a> = 5
568 <a name="XML_ENTITY_NODE">XML_ENTITY_NODE</a> = 6
569 <a name="XML_PI_NODE">XML_PI_NODE</a> = 7
570 <a name="XML_COMMENT_NODE">XML_COMMENT_NODE</a> = 8
571 <a name="XML_DOCUMENT_NODE">XML_DOCUMENT_NODE</a> = 9
572 <a name="XML_DOCUMENT_TYPE_NODE">XML_DOCUMENT_TYPE_NODE</a> = 10
573 <a name="XML_DOCUMENT_FRAG_NODE">XML_DOCUMENT_FRAG_NODE</a> = 11
574 <a name="XML_NOTATION_NODE">XML_NOTATION_NODE</a> = 12
575 <a name="XML_HTML_DOCUMENT_NODE">XML_HTML_DOCUMENT_NODE</a> = 13
576 <a name="XML_DTD_NODE">XML_DTD_NODE</a> = 14
577 <a name="XML_ELEMENT_DECL">XML_ELEMENT_DECL</a> = 15
578 <a name="XML_ATTRIBUTE_DECL">XML_ATTRIBUTE_DECL</a> = 16
579 <a name="XML_ENTITY_DECL">XML_ENTITY_DECL</a> = 17
580 <a name="XML_NAMESPACE_DECL">XML_NAMESPACE_DECL</a> = 18
581 <a name="XML_XINCLUDE_START">XML_XINCLUDE_START</a> = 19
582 <a name="XML_XINCLUDE_END">XML_XINCLUDE_END</a> = 20
583 <a name="XML_DOCB_DOCUMENT_NODE">XML_DOCB_DOCUMENT_NODE</a> = 21
584};
585</pre><p/>
586</div>
587 <hr/>
588 <div class="refsect2" lang="en"><h3><a name="xmlElementTypeVal">Enum </a>xmlElementTypeVal</h3><pre class="programlisting">enum <a href="#xmlElementTypeVal">xmlElementTypeVal</a> {
589 <a name="XML_ELEMENT_TYPE_UNDEFINED">XML_ELEMENT_TYPE_UNDEFINED</a> = 0
590 <a name="XML_ELEMENT_TYPE_EMPTY">XML_ELEMENT_TYPE_EMPTY</a> = 1
591 <a name="XML_ELEMENT_TYPE_ANY">XML_ELEMENT_TYPE_ANY</a> = 2
592 <a name="XML_ELEMENT_TYPE_MIXED">XML_ELEMENT_TYPE_MIXED</a> = 3
593 <a name="XML_ELEMENT_TYPE_ELEMENT">XML_ELEMENT_TYPE_ELEMENT</a> = 4
594};
595</pre><p/>
596</div>
597 <hr/>
598 <div class="refsect2" lang="en"><h3><a name="xmlEntity">Structure </a>xmlEntity</h3><pre class="programlisting">struct _xmlEntity {
599 void * _private : application data
600 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ENTITY_DECL, must be second !
601 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Entity name
602 struct _xmlNode * children : First child link
603 struct _xmlNode * last : Last child link
604 struct _xmlDtd * parent : -&gt; DTD
605 struct _xmlNode * next : next sibling link
606 struct _xmlNode * prev : previous sibling link
607 struct _xmlDoc * doc : the containing document
608 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig : content without ref substitution
609 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content : content or ndata if unparsed
610 int length : the content length
611 <a href="libxml2-entities.html#xmlEntityType">xmlEntityType</a> etype : The entity type
612 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID : External identifier for PUBLIC
613 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID : URI for a SYSTEM or PUBLIC Entity
614 struct _xmlEntity * nexte : unused
615 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI : the full URI as computed
616 int owner : does the entity own the childrens
Daniel Veillard2cba4152008-08-27 11:45:41 +0000617 int checked : was the entity content checked this is also used to count entites * r
Daniel Veillard1db4a662005-09-12 13:10:09 +0000618} xmlEntity;
619</pre><p/>
620</div>
621 <hr/>
622 <div class="refsect2" lang="en"><h3><a name="xmlEntityPtr">Typedef </a>xmlEntityPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntity">xmlEntity</a> * xmlEntityPtr;
623</pre><p/>
624</div>
625 <hr/>
626 <div class="refsect2" lang="en"><h3><a name="xmlEnumeration">Structure </a>xmlEnumeration</h3><pre class="programlisting">struct _xmlEnumeration {
627 struct _xmlEnumeration * next : next one
628 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Enumeration name
629} xmlEnumeration;
630</pre><p/>
631</div>
632 <hr/>
633 <div class="refsect2" lang="en"><h3><a name="xmlEnumerationPtr">Typedef </a>xmlEnumerationPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEnumeration">xmlEnumeration</a> * xmlEnumerationPtr;
634</pre><p/>
635</div>
636 <hr/>
637 <div class="refsect2" lang="en"><h3><a name="xmlID">Structure </a>xmlID</h3><pre class="programlisting">struct _xmlID {
638 struct _xmlID * next : next ID
639 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The ID name
640 <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr : The <a href="libxml2-SAX.html#attribute">attribute</a> holding it
641 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : The <a href="libxml2-SAX.html#attribute">attribute</a> if attr is not available
642 int lineno : The line number if attr is not available
643 struct _xmlDoc * doc : The document holding the ID
644} xmlID;
645</pre><p/>
646</div>
647 <hr/>
648 <div class="refsect2" lang="en"><h3><a name="xmlIDPtr">Typedef </a>xmlIDPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlID">xmlID</a> * xmlIDPtr;
649</pre><p/>
650</div>
651 <hr/>
652 <div class="refsect2" lang="en"><h3><a name="xmlNode">Structure </a>xmlNode</h3><pre class="programlisting">struct _xmlNode {
653 void * _private : application data
654 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : type number, must be second !
655 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the node, or the entity
656 struct _xmlNode * children : parent-&gt;childs link
657 struct _xmlNode * last : last child link
658 struct _xmlNode * parent : child-&gt;parent link
659 struct _xmlNode * next : next sibling link
660 struct _xmlNode * prev : previous sibling link
661 struct _xmlDoc * doc : the containing document End of common part
662 <a href="libxml2-tree.html#xmlNs">xmlNs</a> * ns : pointer to the associated namespace
663 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content : the content
664 struct _xmlAttr * properties : properties list
665 <a href="libxml2-tree.html#xmlNs">xmlNs</a> * nsDef : namespace definitions on this node
666 void * psvi : for type/PSVI informations
667 unsigned short line : line number
668 unsigned short extra : extra data for XPath/XSLT
669} xmlNode;
670</pre><p/>
671</div>
672 <hr/>
673 <div class="refsect2" lang="en"><h3><a name="xmlNodePtr">Typedef </a>xmlNodePtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNode">xmlNode</a> * xmlNodePtr;
674</pre><p/>
675</div>
676 <hr/>
677 <div class="refsect2" lang="en"><h3><a name="xmlNotation">Structure </a>xmlNotation</h3><pre class="programlisting">struct _xmlNotation {
678 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Notation name
679 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * PublicID : Public identifier, if any
680 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID : System identifier, if any
681} xmlNotation;
682</pre><p/>
683</div>
684 <hr/>
685 <div class="refsect2" lang="en"><h3><a name="xmlNotationPtr">Typedef </a>xmlNotationPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNotation">xmlNotation</a> * xmlNotationPtr;
686</pre><p/>
687</div>
688 <hr/>
689 <div class="refsect2" lang="en"><h3><a name="xmlNs">Structure </a>xmlNs</h3><pre class="programlisting">struct _xmlNs {
690 struct _xmlNs * next : next Ns link for this node
691 <a href="libxml2-tree.html#xmlNsType">xmlNsType</a> type : global or local
692 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href : URL for the namespace
693 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : prefix for the namespace
694 void * _private : application data
Daniel Veillard6f9b0872006-08-12 14:09:01 +0000695 struct _xmlDoc * context : normally an <a href="libxml2-tree.html#xmlDoc">xmlDoc</a>
Daniel Veillard1db4a662005-09-12 13:10:09 +0000696} xmlNs;
697</pre><p/>
698</div>
699 <hr/>
700 <div class="refsect2" lang="en"><h3><a name="xmlNsPtr">Typedef </a>xmlNsPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNs">xmlNs</a> * xmlNsPtr;
701</pre><p/>
702</div>
703 <hr/>
704 <div class="refsect2" lang="en"><h3><a name="xmlNsType">Typedef </a>xmlNsType</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementType">xmlElementType</a> xmlNsType;
705</pre><p/>
706</div>
707 <hr/>
708 <div class="refsect2" lang="en"><h3><a name="xmlOutputBuffer">Structure </a>xmlOutputBuffer</h3><pre class="programlisting">struct _xmlOutputBuffer {
709 void * context
710 <a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writecallback
711 <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closecallback
712 <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder : I18N conversions to UTF-8
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800713 <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buffer : Local buffer encoded in UTF-8 or ISOLatin
714 <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> conv : if encoder != NULL buffer for output
Daniel Veillard1db4a662005-09-12 13:10:09 +0000715 int written : total number of byte written
716 int error
717} xmlOutputBuffer;
718</pre><p/>
719</div>
720 <hr/>
721 <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferPtr">Typedef </a>xmlOutputBufferPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBuffer">xmlOutputBuffer</a> * xmlOutputBufferPtr;
722</pre><p/>
723</div>
724 <hr/>
725 <div class="refsect2" lang="en"><h3><a name="xmlParserCtxt">Structure </a>xmlParserCtxt</h3><pre class="programlisting">struct _xmlParserCtxt {
726 struct _xmlSAXHandler * sax : The SAX handler
727 void * userData : For SAX interface only, used by DOM build
728 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> myDoc : the document being built
729 int wellFormed : is the document well formed
730 int replaceEntities : shall we replace entities ?
731 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version : the XML version string
732 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding : the declared encoding, if any
733 int standalone : standalone document
Daniel Veillard472b1e12009-08-24 17:39:07 +0200734 int html : an HTML(1)/Docbook(2) document * 3 is HTML after &lt;head&gt; * 10 is HTML
Daniel Veillard1db4a662005-09-12 13:10:09 +0000735 <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input : Current input stream
736 int inputNr : Number of current input streams
737 int inputMax : Max number of input streams
738 <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> * inputTab : stack of inputs Node analysis stack only used for DOM building
739 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node : Current parsed Node
740 int nodeNr : Depth of the parsing stack
741 int nodeMax : Max depth of the parsing stack
742 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * nodeTab : array of nodes
743 int record_info : Whether node info should be kept
744 <a href="libxml2-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a> node_seq : info about each node parsed
745 int errNo : error code
746 int hasExternalSubset : <a href="libxml2-SAX.html#reference">reference</a> and external subset
747 int hasPErefs : the internal subset has PE refs
748 int external : are we parsing an external entity
749 int valid : is the document valid
750 int validate : shall we try to validate ?
751 <a href="libxml2-valid.html#xmlValidCtxt">xmlValidCtxt</a> vctxt : The validity context
752 <a href="libxml2-parser.html#xmlParserInputState">xmlParserInputState</a> instate : current type of input
753 int token : next char look-ahead
754 char * directory : the data directory Node name stack
755 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Current parsed Node
756 int nameNr : Depth of the parsing stack
757 int nameMax : Max depth of the parsing stack
758 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * * nameTab : array of nodes
759 long nbChars : number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> processed
760 long checkIndex : used by progressive parsing lookup
761 int keepBlanks : ugly but ...
762 int disableSAX : SAX callbacks are disabled
763 int inSubset : Parsing is in int 1/ext 2 subset
764 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * intSubName : name of subset
765 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * extSubURI : URI of external subset
766 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * extSubSystem : SYSTEM ID of external subset xml:space values
767 int * space : Should the parser preserve spaces
768 int spaceNr : Depth of the parsing stack
769 int spaceMax : Max depth of the parsing stack
770 int * spaceTab : array of space infos
771 int depth : to prevent entity substitution loops
772 <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> entity : used to check entities boundaries
773 int charset : encoding of the in-memory content actually an <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a>
774 int nodelen : Those two fields are there to
775 int nodemem : Speed up large node parsing
776 int pedantic : signal pedantic warnings
777 void * _private : For user data, libxml won't touch it
778 int loadsubset : should the external subset be loaded
779 int linenumbers : set line number in element content
780 void * catalogs : document's own catalog
781 int recovery : run in recovery mode
782 int progressive : is this a progressive parsing
783 <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict : dictionnary for the parser
784 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * * atts : array for the attributes callbacks
785 int maxatts : the size of the array
786 int docdict : * pre-interned strings *
787 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str_xml
788 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str_xmlns
789 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str_xml_ns : * Everything below is used only by the new SAX mode *
790 int sax2 : operating in the new SAX mode
791 int nsNr : the number of inherited namespaces
792 int nsMax : the size of the arrays
793 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * * nsTab : the array of prefix/namespace name
794 int * attallocs : which <a href="libxml2-SAX.html#attribute">attribute</a> were allocated
795 void * * pushTab : array of data for push
796 <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attsDefault : defaulted attributes if any
797 <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attsSpecial : non-CDATA attributes if any
798 int nsWellFormed : is the document XML Nanespace okay
799 int options : * Those fields are needed only for treaming parsing so far *
800 int dictNames : Use dictionary names for the tree
801 int freeElemsNr : number of freed element nodes
802 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> freeElems : List of freed element nodes
803 int freeAttrsNr : number of freed attributes nodes
804 <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> freeAttrs : * the complete error informations for the last error. *
805 <a href="libxml2-xmlerror.html#xmlError">xmlError</a> lastError
806 <a href="libxml2-parser.html#xmlParserMode">xmlParserMode</a> parseMode : the parser mode
Daniel Veillard2cba4152008-08-27 11:45:41 +0000807 unsigned long nbentities : number of entities references
Daniel Veillardbb5055f2010-03-15 16:21:00 +0100808 unsigned long sizeentities : size of parsed entities for use by HTML non-recursive parser
809 <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfo : Current NodeInfo
810 int nodeInfoNr : Depth of the parsing stack
811 int nodeInfoMax : Max depth of the parsing stack
812 <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfoTab : array of nodeInfos
Daniel Veillardc943f702012-05-23 17:10:59 +0800813 int input_id : we need to label inputs
Daniel Veillard1db4a662005-09-12 13:10:09 +0000814} xmlParserCtxt;
815</pre><p/>
816</div>
817 <hr/>
818 <div class="refsect2" lang="en"><h3><a name="xmlParserCtxtPtr">Typedef </a>xmlParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> * xmlParserCtxtPtr;
819</pre><p/>
820</div>
821 <hr/>
822 <div class="refsect2" lang="en"><h3><a name="xmlParserInput">Structure </a>xmlParserInput</h3><pre class="programlisting">struct _xmlParserInput {
823 <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> buf : UTF-8 encoded buffer
824 const char * filename : The file analyzed, if any
825 const char * directory : the directory/base of the file
826 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base : Base of the array to parse
827 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur : Current char being parsed
828 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * end : end of the array to parse
829 int length : length if known
830 int line : Current line
831 int col : * NOTE: consumed is only tested for equality in the parser code, *
832 unsigned long consumed : How many xmlChars already consumed
833 <a href="libxml2-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a> free : function to deallocate the base
834 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding : the encoding string for entity
835 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version : the version string for entity
836 int standalone : Was that entity marked standalone
837 int id : an unique identifier for the entity
838} xmlParserInput;
839</pre><p/>
840</div>
841 <hr/>
842 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBuffer">Structure </a>xmlParserInputBuffer</h3><pre class="programlisting">struct _xmlParserInputBuffer {
843 void * context
844 <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readcallback
845 <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closecallback
846 <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder : I18N conversions to UTF-8
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800847 <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buffer : Local buffer encoded in UTF-8
848 <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> raw : if encoder != NULL buffer for raw input
Daniel Veillard1db4a662005-09-12 13:10:09 +0000849 int compressed : -1=unknown, 0=not compressed, 1=compressed
850 int error
851 unsigned long rawconsumed : amount consumed from raw
852} xmlParserInputBuffer;
853</pre><p/>
854</div>
855 <hr/>
856 <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferPtr">Typedef </a>xmlParserInputBufferPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> * xmlParserInputBufferPtr;
857</pre><p/>
858</div>
859 <hr/>
860 <div class="refsect2" lang="en"><h3><a name="xmlParserInputPtr">Typedef </a>xmlParserInputPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> * xmlParserInputPtr;
861</pre><p/>
862</div>
863 <hr/>
864 <div class="refsect2" lang="en"><h3><a name="xmlRef">Structure </a>xmlRef</h3><pre class="programlisting">struct _xmlRef {
865 struct _xmlRef * next : next Ref
866 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The Ref name
867 <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr : The <a href="libxml2-SAX.html#attribute">attribute</a> holding it
868 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : The <a href="libxml2-SAX.html#attribute">attribute</a> if attr is not available
869 int lineno : The line number if attr is not available
870} xmlRef;
871</pre><p/>
872</div>
873 <hr/>
874 <div class="refsect2" lang="en"><h3><a name="xmlRefPtr">Typedef </a>xmlRefPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlRef">xmlRef</a> * xmlRefPtr;
875</pre><p/>
876</div>
877 <hr/>
878 <div class="refsect2" lang="en"><h3><a name="xmlSAXHandler">Structure </a>xmlSAXHandler</h3><pre class="programlisting">struct _xmlSAXHandler {
879 <a href="libxml2-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a> internalSubset
880 <a href="libxml2-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a> isStandalone
881 <a href="libxml2-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a> hasInternalSubset
882 <a href="libxml2-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a> hasExternalSubset
883 <a href="libxml2-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a> resolveEntity
884 <a href="libxml2-parser.html#getEntitySAXFunc">getEntitySAXFunc</a> getEntity
885 <a href="libxml2-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a> entityDecl
886 <a href="libxml2-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a> notationDecl
887 <a href="libxml2-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a> attributeDecl
888 <a href="libxml2-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a> elementDecl
889 <a href="libxml2-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a> unparsedEntityDecl
890 <a href="libxml2-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a> setDocumentLocator
891 <a href="libxml2-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a> startDocument
892 <a href="libxml2-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a> endDocument
893 <a href="libxml2-parser.html#startElementSAXFunc">startElementSAXFunc</a> startElement
894 <a href="libxml2-parser.html#endElementSAXFunc">endElementSAXFunc</a> endElement
895 <a href="libxml2-parser.html#referenceSAXFunc">referenceSAXFunc</a> reference
896 <a href="libxml2-parser.html#charactersSAXFunc">charactersSAXFunc</a> characters
897 <a href="libxml2-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a> ignorableWhitespace
898 <a href="libxml2-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a> processingInstruction
899 <a href="libxml2-parser.html#commentSAXFunc">commentSAXFunc</a> comment
900 <a href="libxml2-parser.html#warningSAXFunc">warningSAXFunc</a> warning
901 <a href="libxml2-parser.html#errorSAXFunc">errorSAXFunc</a> error
902 <a href="libxml2-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a> fatalError : unused error() get all the errors
903 <a href="libxml2-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a> getParameterEntity
904 <a href="libxml2-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a> cdataBlock
905 <a href="libxml2-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a> externalSubset
906 unsigned int initialized : The following fields are extensions available only on version 2
907 void * _private
908 <a href="libxml2-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a> startElementNs
909 <a href="libxml2-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a> endElementNs
910 <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror
911} xmlSAXHandler;
912</pre><p/>
913</div>
914 <hr/>
915 <div class="refsect2" lang="en"><h3><a name="xmlSAXHandlerPtr">Typedef </a>xmlSAXHandlerPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * xmlSAXHandlerPtr;
916</pre><p/>
917</div>
918 <hr/>
919 <div class="refsect2" lang="en"><h3><a name="xmlSAXLocator">Structure </a>xmlSAXLocator</h3><pre class="programlisting">struct _xmlSAXLocator {
920 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *(*getPublicId) getPublicId
921 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *(*getSystemId) getSystemId
922 int(*getLineNumber) getLineNumber
923 int(*getColumnNumber) getColumnNumber
924} xmlSAXLocator;
925</pre><p/>
926</div>
927 <hr/>
928 <div class="refsect2" lang="en"><h3><a name="xmlSAXLocatorPtr">Typedef </a>xmlSAXLocatorPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXLocator">xmlSAXLocator</a> * xmlSAXLocatorPtr;
929</pre><p/>
930</div>
931 <hr/>
Daniel Veillard6f9b0872006-08-12 14:09:01 +0000932 <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapAcquireNsFunction"/>Function type xmlDOMWrapAcquireNsFunction</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlDOMWrapAcquireNsFunction (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsPrefix)<br/>
933</pre><p>A function called to acquire namespaces (xmlNs) from the wrapper.</p>
934<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a DOM wrapper context</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the context node (element or attribute)</td></tr><tr><td><span class="term"><i><tt>nsName</tt></i>:</span></td><td>the requested namespace name</td></tr><tr><td><span class="term"><i><tt>nsPrefix</tt></i>:</span></td><td>the requested namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> or NULL in case of an error.</td></tr></tbody></table></div></div>
935 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +0000936 <div class="refsect2" lang="en"><h3><a name="xmlAddChild"/>xmlAddChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
937</pre><p>Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed) If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an <a href="libxml2-SAX.html#attribute">attribute</a> with equal name, it is first destroyed.</p>
938<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the child or NULL in case of error.</td></tr></tbody></table></div></div>
939 <hr/>
940 <div class="refsect2" lang="en"><h3><a name="xmlAddChildList"/>xmlAddChildList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddChildList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
941</pre><p>Add a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed)</p>
942<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first node in the list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last child or NULL in case of error.</td></tr></tbody></table></div></div>
943 <hr/>
944 <div class="refsect2" lang="en"><h3><a name="xmlAddNextSibling"/>xmlAddNextSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddNextSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
945</pre><p>Add a new node @elem as the next sibling of @cur If the new node was already inserted in a document it is first unlinked from its existing context. As a result of text merging @elem may be freed. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an <a href="libxml2-SAX.html#attribute">attribute</a> with equal name, it is first destroyed.</p>
946<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the new node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new node or NULL in case of error.</td></tr></tbody></table></div></div>
947 <hr/>
948 <div class="refsect2" lang="en"><h3><a name="xmlAddPrevSibling"/>xmlAddPrevSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddPrevSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
949</pre><p>Add a new node @elem as the previous sibling of @cur merging adjacent TEXT nodes (@elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an <a href="libxml2-SAX.html#attribute">attribute</a> with equal name, it is first destroyed.</p>
950<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the new node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new node or NULL in case of error.</td></tr></tbody></table></div></div>
951 <hr/>
952 <div class="refsect2" lang="en"><h3><a name="xmlAddSibling"/>xmlAddSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
953</pre><p>Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context.</p>
954<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the new node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new element or NULL in case of error.</td></tr></tbody></table></div></div>
955 <hr/>
956 <div class="refsect2" lang="en"><h3><a name="xmlAttrSerializeTxtContent"/>xmlAttrSerializeTxtContent ()</h3><pre class="programlisting">void xmlAttrSerializeTxtContent (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string)<br/>
957</pre><p>Serialize text <a href="libxml2-SAX.html#attribute">attribute</a> values to an xml simple buffer</p>
958<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> node</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the text content</td></tr></tbody></table></div></div>
959 <hr/>
Daniel Veillard28cc42d2012-08-10 10:00:18 +0800960 <div class="refsect2" lang="en"><h3><a name="xmlBufContent"/>xmlBufContent ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufContent (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br/>
961</pre><p>Function to extract the content of a buffer</p>
962<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal content</td></tr></tbody></table></div></div>
963 <hr/>
964 <div class="refsect2" lang="en"><h3><a name="xmlBufEnd"/>xmlBufEnd ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufEnd (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br/>
965</pre><p>Function to extract the end of the content of a buffer</p>
966<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the end of the internal content or NULL in case of error</td></tr></tbody></table></div></div>
967 <hr/>
968 <div class="refsect2" lang="en"><h3><a name="xmlBufGetNodeContent"/>xmlBufGetNodeContent ()</h3><pre class="programlisting">int xmlBufGetNodeContent (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
969</pre><p>Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value</p>
970<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>a buffer <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a></td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
971 <hr/>
972 <div class="refsect2" lang="en"><h3><a name="xmlBufNodeDump"/>xmlBufNodeDump ()</h3><pre class="programlisting">size_t xmlBufNodeDump (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format)<br/>
973</pre><p>Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
974<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error</td></tr></tbody></table></div></div>
975 <hr/>
976 <div class="refsect2" lang="en"><h3><a name="xmlBufUse"/>xmlBufUse ()</h3><pre class="programlisting">size_t xmlBufUse (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br/>
977</pre><p>Function to get the length of a buffer</p>
978<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the length of data in the internal content</td></tr></tbody></table></div></div>
979 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +0000980 <div class="refsect2" lang="en"><h3><a name="xmlBufferAdd"/>xmlBufferAdd ()</h3><pre class="programlisting">int xmlBufferAdd (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len)<br/>
981</pre><p>Add a string range to an XML buffer. if len == -1, the length of str is recomputed.</p>
982<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the #xmlChar string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of #xmlChar to add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
983 <hr/>
984 <div class="refsect2" lang="en"><h3><a name="xmlBufferAddHead"/>xmlBufferAddHead ()</h3><pre class="programlisting">int xmlBufferAddHead (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len)<br/>
985</pre><p>Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed.</p>
986<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the #xmlChar string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of #xmlChar to add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
987 <hr/>
988 <div class="refsect2" lang="en"><h3><a name="xmlBufferCCat"/>xmlBufferCCat ()</h3><pre class="programlisting">int xmlBufferCCat (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const char * str)<br/>
989</pre><p>Append a zero terminated C string to an XML buffer.</p>
990<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the C char string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
991 <hr/>
992 <div class="refsect2" lang="en"><h3><a name="xmlBufferCat"/>xmlBufferCat ()</h3><pre class="programlisting">int xmlBufferCat (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
993</pre><p>Append a zero terminated string to an XML buffer.</p>
994<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to add to</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the #xmlChar string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
995 <hr/>
996 <div class="refsect2" lang="en"><h3><a name="xmlBufferContent"/>xmlBufferContent ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufferContent (const <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
997</pre><p>Function to extract the content of a buffer</p>
998<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal content</td></tr></tbody></table></div></div>
999 <hr/>
1000 <div class="refsect2" lang="en"><h3><a name="xmlBufferCreate"/>xmlBufferCreate ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreate (void)<br/>
1001</pre><p>routine to create an XML buffer.</p>
1002<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure.</td></tr></tbody></table></div></div>
1003 <hr/>
1004 <div class="refsect2" lang="en"><h3><a name="xmlBufferCreateSize"/>xmlBufferCreateSize ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreateSize (size_t size)<br/>
1005</pre><p>routine to create an XML buffer.</p>
1006<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>initial size of buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure.</td></tr></tbody></table></div></div>
1007 <hr/>
1008 <div class="refsect2" lang="en"><h3><a name="xmlBufferCreateStatic"/>xmlBufferCreateStatic ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreateStatic (void * mem, <br/> size_t size)<br/>
1009</pre><p>routine to create an XML buffer from an immutable memory area. The area won't be modified nor copied, and is expected to be present until the end of the buffer lifetime.</p>
1010<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>the memory area</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure.</td></tr></tbody></table></div></div>
1011 <hr/>
Daniel Veillardc943f702012-05-23 17:10:59 +08001012 <div class="refsect2" lang="en"><h3><a name="xmlBufferDetach"/>xmlBufferDetach ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufferDetach (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
1013</pre><p>Remove the string contained in a buffer and gie it back to the caller. The buffer is reset to an empty content. This doesn't work with immutable buffers as they can't be reset.</p>
1014<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous string contained by the buffer.</td></tr></tbody></table></div></div>
1015 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001016 <div class="refsect2" lang="en"><h3><a name="xmlBufferDump"/>xmlBufferDump ()</h3><pre class="programlisting">int xmlBufferDump (FILE * file, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
1017</pre><p>Dumps an XML buffer to a FILE *.</p>
1018<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of #xmlChar written</td></tr></tbody></table></div></div>
1019 <hr/>
1020 <div class="refsect2" lang="en"><h3><a name="xmlBufferEmpty"/>xmlBufferEmpty ()</h3><pre class="programlisting">void xmlBufferEmpty (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
1021</pre><p>empty a buffer.</p>
1022<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr></tbody></table></div></div>
1023 <hr/>
1024 <div class="refsect2" lang="en"><h3><a name="xmlBufferFree"/>xmlBufferFree ()</h3><pre class="programlisting">void xmlBufferFree (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
1025</pre><p>Frees an XML buffer. It frees both the content and the structure which encapsulate it.</p>
1026<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to free</td></tr></tbody></table></div></div>
1027 <hr/>
1028 <div class="refsect2" lang="en"><h3><a name="xmlBufferGrow"/>xmlBufferGrow ()</h3><pre class="programlisting">int xmlBufferGrow (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int len)<br/>
1029</pre><p>Grow the available space of an XML buffer.</p>
1030<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the minimum free size to allocate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new available space or -1 in case of error</td></tr></tbody></table></div></div>
1031 <hr/>
1032 <div class="refsect2" lang="en"><h3><a name="xmlBufferLength"/>xmlBufferLength ()</h3><pre class="programlisting">int xmlBufferLength (const <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
1033</pre><p>Function to get the length of a buffer</p>
1034<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the length of data in the internal content</td></tr></tbody></table></div></div>
1035 <hr/>
1036 <div class="refsect2" lang="en"><h3><a name="xmlBufferResize"/>xmlBufferResize ()</h3><pre class="programlisting">int xmlBufferResize (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int size)<br/>
1037</pre><p>Resize a buffer to accommodate minimum size of @size.</p>
1038<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to resize</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the desired size</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of problems, 1 otherwise</td></tr></tbody></table></div></div>
1039 <hr/>
1040 <div class="refsect2" lang="en"><h3><a name="xmlBufferSetAllocationScheme"/>xmlBufferSetAllocationScheme ()</h3><pre class="programlisting">void xmlBufferSetAllocationScheme (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)<br/>
1041</pre><p>Sets the allocation scheme for this buffer</p>
1042<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to tune</td></tr><tr><td><span class="term"><i><tt>scheme</tt></i>:</span></td><td>allocation scheme to use</td></tr></tbody></table></div></div>
1043 <hr/>
1044 <div class="refsect2" lang="en"><h3><a name="xmlBufferShrink"/>xmlBufferShrink ()</h3><pre class="programlisting">int xmlBufferShrink (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int len)<br/>
1045</pre><p>Remove the beginning of an XML buffer.</p>
1046<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of #xmlChar removed, or -1 in case of failure.</td></tr></tbody></table></div></div>
1047 <hr/>
1048 <div class="refsect2" lang="en"><h3><a name="xmlBufferWriteCHAR"/>xmlBufferWriteCHAR ()</h3><pre class="programlisting">void xmlBufferWriteCHAR (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string)<br/>
1049</pre><p>routine which manages and grows an output buffer. This one adds xmlChars at the end of the buffer.</p>
1050<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the string to add</td></tr></tbody></table></div></div>
1051 <hr/>
1052 <div class="refsect2" lang="en"><h3><a name="xmlBufferWriteChar"/>xmlBufferWriteChar ()</h3><pre class="programlisting">void xmlBufferWriteChar (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const char * string)<br/>
1053</pre><p>routine which manage and grows an output buffer. This one add C chars at the end of the array.</p>
1054<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the string to add</td></tr></tbody></table></div></div>
1055 <hr/>
1056 <div class="refsect2" lang="en"><h3><a name="xmlBufferWriteQuotedString"/>xmlBufferWriteQuotedString ()</h3><pre class="programlisting">void xmlBufferWriteQuotedString (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string)<br/>
1057</pre><p>routine which manage and grows an output buffer. This one writes a quoted or double quoted #xmlChar string, checking first if it holds quote or double-quotes internally</p>
1058<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the string to add</td></tr></tbody></table></div></div>
1059 <hr/>
1060 <div class="refsect2" lang="en"><h3><a name="xmlBuildQName"/>xmlBuildQName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBuildQName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ncname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * memory, <br/> int len)<br/>
1061</pre><p>Builds the QName @prefix:@ncname in @memory if there is enough space and prefix is not NULL nor empty, otherwise allocate a new string. If prefix is NULL or empty it returns ncname.</p>
1062<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ncname</tt></i>:</span></td><td>the Name</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>preallocated memory</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>preallocated memory length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string which must be freed by the caller if different from @memory and @ncname or NULL in case of error</td></tr></tbody></table></div></div>
1063 <hr/>
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +00001064 <div class="refsect2" lang="en"><h3><a name="xmlChildElementCount"/>xmlChildElementCount ()</h3><pre class="programlisting">unsigned long xmlChildElementCount (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br/>
1065</pre><p>Finds the current number of child nodes of that element which are element nodes. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
1066<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the count of element child or 0 if not available</td></tr></tbody></table></div></div>
1067 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001068 <div class="refsect2" lang="en"><h3><a name="xmlCopyDoc"/>xmlCopyDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCopyDoc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int recursive)<br/>
1069</pre><p>Do a copy of the document info. If recursive, the content tree will be copied too as well as DTD, namespaces and entities.</p>
1070<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>recursive</tt></i>:</span></td><td>if not zero do a recursive copy.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlDocPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1071 <hr/>
1072 <div class="refsect2" lang="en"><h3><a name="xmlCopyDtd"/>xmlCopyDtd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlCopyDtd (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)<br/>
1073</pre><p>Do a copy of the dtd.</p>
1074<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>the dtd</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlDtdPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1075 <hr/>
1076 <div class="refsect2" lang="en"><h3><a name="xmlCopyNamespace"/>xmlCopyNamespace ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlCopyNamespace (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br/>
1077</pre><p>Do a copy of the namespace.</p>
1078<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNsPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1079 <hr/>
1080 <div class="refsect2" lang="en"><h3><a name="xmlCopyNamespaceList"/>xmlCopyNamespaceList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlCopyNamespaceList (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br/>
1081</pre><p>Do a copy of an namespace list.</p>
1082<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNsPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1083 <hr/>
1084 <div class="refsect2" lang="en"><h3><a name="xmlCopyNode"/>xmlCopyNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlCopyNode (const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int extended)<br/>
1085</pre><p>Do a copy of the node.</p>
1086<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>extended</tt></i>:</span></td><td>if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1087 <hr/>
1088 <div class="refsect2" lang="en"><h3><a name="xmlCopyNodeList"/>xmlCopyNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlCopyNodeList (const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
1089</pre><p>Do a recursive copy of the node list. Use xmlDocCopyNodeList() if possible to ensure string interning.</p>
1090<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the first node in the list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1091 <hr/>
1092 <div class="refsect2" lang="en"><h3><a name="xmlCopyProp"/>xmlCopyProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlCopyProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
1093</pre><p>Do a copy of the attribute.</p>
1094<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the element where the <a href="libxml2-SAX.html#attribute">attribute</a> will be grafted</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlAttrPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1095 <hr/>
1096 <div class="refsect2" lang="en"><h3><a name="xmlCopyPropList"/>xmlCopyPropList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlCopyPropList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
1097</pre><p>Do a copy of an <a href="libxml2-SAX.html#attribute">attribute</a> list.</p>
1098<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the element where the attributes will be grafted</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlAttrPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1099 <hr/>
1100 <div class="refsect2" lang="en"><h3><a name="xmlCreateIntSubset"/>xmlCreateIntSubset ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlCreateIntSubset (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
1101</pre><p>Create the internal subset of a document</p>
1102<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external (PUBLIC) ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div></div>
1103 <hr/>
1104 <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapAdoptNode"/>xmlDOMWrapAdoptNode ()</h3><pre class="programlisting">int xmlDOMWrapAdoptNode (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br/> int options)<br/>
Daniel Veillard6f9b0872006-08-12 14:09:01 +00001105</pre><p>References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc-&gt;oldNs entries are used This is the case when you have an unliked node and just want to move it to the context of If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml2-SAX.html#attribute">attribute</a> values or element content. NOTE: This function was not intensively tested.</p>
Daniel Veillardd463c992006-02-23 22:07:59 +00001106<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the optional context for custom processing</td></tr><tr><td><span class="term"><i><tt>sourceDoc</tt></i>:</span></td><td>the optional sourceDoc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to start with</td></tr><tr><td><span class="term"><i><tt>destDoc</tt></i>:</span></td><td>the destination doc</td></tr><tr><td><span class="term"><i><tt>destParent</tt></i>:</span></td><td>the optional new parent of @node in @destDoc</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the operation succeeded, 1 if a node of unsupported type was given, 2 if a node of not yet supported type was given and -1 on API/internal errors.</td></tr></tbody></table></div></div>
1107 <hr/>
1108 <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapCloneNode"/>xmlDOMWrapCloneNode ()</h3><pre class="programlisting">int xmlDOMWrapCloneNode (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * resNode, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br/> int deep, <br/> int options)<br/>
Daniel Veillard6f9b0872006-08-12 14:09:01 +00001109</pre><p>References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc-&gt;oldNs entries are used. This is the case when you don't know already where the cloned branch will be added to. If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml2-SAX.html#attribute">attribute</a> values or element content. TODO: 1) What to do with XInclude? Currently this returns an error for XInclude.</p>
Daniel Veillardb2f8f1d2006-04-28 16:30:48 +00001110<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the optional context for custom processing</td></tr><tr><td><span class="term"><i><tt>sourceDoc</tt></i>:</span></td><td>the optional sourceDoc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to start with</td></tr><tr><td><span class="term"><i><tt>resNode</tt></i>:</span></td><td>the clone of the given @node</td></tr><tr><td><span class="term"><i><tt>destDoc</tt></i>:</span></td><td>the destination doc</td></tr><tr><td><span class="term"><i><tt>destParent</tt></i>:</span></td><td>the optional new parent of @node in @destDoc</td></tr><tr><td><span class="term"><i><tt>deep</tt></i>:</span></td><td>descend into child if set</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the operation succeeded, 1 if a node of unsupported (or not yet supported) type was given, -1 on API/internal errors.</td></tr></tbody></table></div></div>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001111 <hr/>
1112 <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapFreeCtxt"/>xmlDOMWrapFreeCtxt ()</h3><pre class="programlisting">void xmlDOMWrapFreeCtxt (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt)<br/>
1113</pre><p>Frees the DOM-wrapper context.</p>
1114<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the DOM-wrapper context</td></tr></tbody></table></div></div>
1115 <hr/>
1116 <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapNewCtxt"/>xmlDOMWrapNewCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> xmlDOMWrapNewCtxt (void)<br/>
1117</pre><p>Allocates and initializes a new DOM-wrapper context.</p>
1118<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> or NULL in case of an internal errror.</td></tr></tbody></table></div></div>
1119 <hr/>
1120 <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapReconcileNamespaces"/>xmlDOMWrapReconcileNamespaces ()</h3><pre class="programlisting">int xmlDOMWrapReconcileNamespaces (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> int options)<br/>
Daniel Veillard6f9b0872006-08-12 14:09:01 +00001121</pre><p>Ensures that ns-references point to ns-decls hold on element-nodes. Ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml2-SAX.html#attribute">attribute</a> values or element content. NOTE: This function was not intensively tested.</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001122<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>DOM wrapper context, unused at the moment</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element-node</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if succeeded, -1 otherwise and on API/internal errors.</td></tr></tbody></table></div></div>
1123 <hr/>
1124 <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapRemoveNode"/>xmlDOMWrapRemoveNode ()</h3><pre class="programlisting">int xmlDOMWrapRemoveNode (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int options)<br/>
Daniel Veillard6f9b0872006-08-12 14:09:01 +00001125</pre><p>Unlinks the given node from its owner. This will substitute ns-references to node-&gt;nsDef for ns-references to doc-&gt;oldNs, thus ensuring the removed branch to be autark wrt ns-references. NOTE: This function was not intensively tested.</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001126<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a DOM wrapper context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the doc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to be removed.</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>set of options, unused at the moment</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, 1 if the node is not supported, -1 on API and internal errors.</td></tr></tbody></table></div></div>
1127 <hr/>
1128 <div class="refsect2" lang="en"><h3><a name="xmlDocCopyNode"/>xmlDocCopyNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNode (const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int extended)<br/>
1129</pre><p>Do a copy of the node to a given document.</p>
1130<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>extended</tt></i>:</span></td><td>if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1131 <hr/>
1132 <div class="refsect2" lang="en"><h3><a name="xmlDocCopyNodeList"/>xmlDocCopyNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNodeList (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
1133</pre><p>Do a recursive copy of the node list.</p>
1134<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the target document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the first node in the list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div></div>
1135 <hr/>
1136 <div class="refsect2" lang="en"><h3><a name="xmlDocDump"/>xmlDocDump ()</h3><pre class="programlisting">int xmlDocDump (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
1137</pre><p>Dump an XML document to an open FILE.</p>
1138<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
1139 <hr/>
1140 <div class="refsect2" lang="en"><h3><a name="xmlDocDumpFormatMemory"/>xmlDocDumpFormatMemory ()</h3><pre class="programlisting">void xmlDocDumpFormatMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format)<br/>
1141</pre><p>Dump an XML document in memory and return the #xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
1142<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
1143 <hr/>
1144 <div class="refsect2" lang="en"><h3><a name="xmlDocDumpFormatMemoryEnc"/>xmlDocDumpFormatMemoryEnc ()</h3><pre class="programlisting">void xmlDocDumpFormatMemoryEnc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br/> int * doc_txt_len, <br/> const char * txt_encoding, <br/> int format)<br/>
1145</pre><p>Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
1146<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out_doc</tt></i>:</span></td><td>Document to generate XML text from</td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>Memory pointer for allocated XML text</td></tr><tr><td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td><td>Length of the generated XML text</td></tr><tr><td><span class="term"><i><tt>txt_encoding</tt></i>:</span></td><td>Character encoding to use when generating XML text</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
1147 <hr/>
1148 <div class="refsect2" lang="en"><h3><a name="xmlDocDumpMemory"/>xmlDocDumpMemory ()</h3><pre class="programlisting">void xmlDocDumpMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size)<br/>
1149</pre><p>Dump an XML document in memory and return the #xmlChar * and it's size in bytes. It's up to the caller to free the memory with xmlFree(). The resulting byte array is zero terminated, though the last 0 is not included in the returned size.</p>
1150<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div></div>
1151 <hr/>
1152 <div class="refsect2" lang="en"><h3><a name="xmlDocDumpMemoryEnc"/>xmlDocDumpMemoryEnc ()</h3><pre class="programlisting">void xmlDocDumpMemoryEnc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br/> int * doc_txt_len, <br/> const char * txt_encoding)<br/>
1153</pre><p>Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree().</p>
1154<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out_doc</tt></i>:</span></td><td>Document to generate XML text from</td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>Memory pointer for allocated XML text</td></tr><tr><td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td><td>Length of the generated XML text</td></tr><tr><td><span class="term"><i><tt>txt_encoding</tt></i>:</span></td><td>Character encoding to use when generating XML text</td></tr></tbody></table></div></div>
1155 <hr/>
1156 <div class="refsect2" lang="en"><h3><a name="xmlDocFormatDump"/>xmlDocFormatDump ()</h3><pre class="programlisting">int xmlDocFormatDump (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> int format)<br/>
1157</pre><p>Dump an XML document to an open FILE.</p>
1158<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</td></tr></tbody></table></div></div>
1159 <hr/>
1160 <div class="refsect2" lang="en"><h3><a name="xmlDocGetRootElement"/>xmlDocGetRootElement ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocGetRootElement (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
1161</pre><p>Get the root element of the document (doc-&gt;children is a list containing possibly comments, PIs, etc ...).</p>
1162<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the #xmlNodePtr for the root or NULL</td></tr></tbody></table></div></div>
1163 <hr/>
1164 <div class="refsect2" lang="en"><h3><a name="xmlDocSetRootElement"/>xmlDocSetRootElement ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocSetRootElement (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> root)<br/>
1165</pre><p>Set the root element of the document (doc-&gt;children is a list containing possibly comments, PIs, etc ...).</p>
Daniel Veillardc8338f12006-10-25 16:06:29 +00001166<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>root</tt></i>:</span></td><td>the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the old root element if any was found, NULL if root was NULL</td></tr></tbody></table></div></div>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001167 <hr/>
1168 <div class="refsect2" lang="en"><h3><a name="xmlElemDump"/>xmlElemDump ()</h3><pre class="programlisting">void xmlElemDump (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
1169</pre><p>Dump an XML/HTML node, recursive behaviour, children are printed too.</p>
1170<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div></div>
1171 <hr/>
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +00001172 <div class="refsect2" lang="en"><h3><a name="xmlFirstElementChild"/>xmlFirstElementChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlFirstElementChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br/>
1173</pre><p>Finds the first child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
1174<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the first element child or NULL if not available</td></tr></tbody></table></div></div>
1175 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001176 <div class="refsect2" lang="en"><h3><a name="xmlFreeDoc"/>xmlFreeDoc ()</h3><pre class="programlisting">void xmlFreeDoc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
1177</pre><p>Free up all the structures used by a document, tree included.</p>
1178<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>pointer to the document</td></tr></tbody></table></div></div>
1179 <hr/>
1180 <div class="refsect2" lang="en"><h3><a name="xmlFreeDtd"/>xmlFreeDtd ()</h3><pre class="programlisting">void xmlFreeDtd (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> cur)<br/>
1181</pre><p>Free a DTD structure.</p>
1182<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the DTD structure to free up</td></tr></tbody></table></div></div>
1183 <hr/>
1184 <div class="refsect2" lang="en"><h3><a name="xmlFreeNode"/>xmlFreeNode ()</h3><pre class="programlisting">void xmlFreeNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
1185</pre><p>Free a node, this is a recursive behaviour, all the children are freed too. This doesn't unlink the child from the list, use xmlUnlinkNode() first.</p>
1186<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node</td></tr></tbody></table></div></div>
1187 <hr/>
1188 <div class="refsect2" lang="en"><h3><a name="xmlFreeNodeList"/>xmlFreeNodeList ()</h3><pre class="programlisting">void xmlFreeNodeList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
1189</pre><p>Free a node and all its siblings, this is a recursive behaviour, all the children are freed too.</p>
1190<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first node in the list</td></tr></tbody></table></div></div>
1191 <hr/>
1192 <div class="refsect2" lang="en"><h3><a name="xmlFreeNs"/>xmlFreeNs ()</h3><pre class="programlisting">void xmlFreeNs (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br/>
1193</pre><p>Free up the structures associated to a namespace</p>
1194<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the namespace pointer</td></tr></tbody></table></div></div>
1195 <hr/>
1196 <div class="refsect2" lang="en"><h3><a name="xmlFreeNsList"/>xmlFreeNsList ()</h3><pre class="programlisting">void xmlFreeNsList (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br/>
1197</pre><p>Free up all the structures associated to the chained namespaces.</p>
1198<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first namespace pointer</td></tr></tbody></table></div></div>
1199 <hr/>
1200 <div class="refsect2" lang="en"><h3><a name="xmlFreeProp"/>xmlFreeProp ()</h3><pre class="programlisting">void xmlFreeProp (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
1201</pre><p>Free one attribute, all the content is freed too</p>
1202<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
1203 <hr/>
1204 <div class="refsect2" lang="en"><h3><a name="xmlFreePropList"/>xmlFreePropList ()</h3><pre class="programlisting">void xmlFreePropList (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
1205</pre><p>Free a property and all its siblings, all the children are freed too.</p>
1206<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first property in the list</td></tr></tbody></table></div></div>
1207 <hr/>
1208 <div class="refsect2" lang="en"><h3><a name="xmlGetBufferAllocationScheme"/>xmlGetBufferAllocationScheme ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlGetBufferAllocationScheme (void)<br/>
Daniel Veillardc943f702012-05-23 17:10:59 +08001209</pre><p>Types are <a href="libxml2-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> - use exact sizes, keeps memory usage down <a href="libxml2-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> - double buffer when extra needed, improves performance <a href="libxml2-tree.html#XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> - use exact sizes on small strings to keep memory usage tight in normal usage, and doubleit on large strings to avoid pathological performance.</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001210<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current allocation scheme</td></tr></tbody></table></div></div>
1211 <hr/>
1212 <div class="refsect2" lang="en"><h3><a name="xmlGetCompressMode"/>xmlGetCompressMode ()</h3><pre class="programlisting">int xmlGetCompressMode (void)<br/>
1213</pre><p>get the default compression mode used, ZLIB based.</p>
1214<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 (uncompressed) to 9 (max compression)</td></tr></tbody></table></div></div>
1215 <hr/>
1216 <div class="refsect2" lang="en"><h3><a name="xmlGetDocCompressMode"/>xmlGetDocCompressMode ()</h3><pre class="programlisting">int xmlGetDocCompressMode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
1217</pre><p>get the compression ratio for a document, ZLIB based</p>
1218<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 (uncompressed) to 9 (max compression)</td></tr></tbody></table></div></div>
1219 <hr/>
1220 <div class="refsect2" lang="en"><h3><a name="xmlGetIntSubset"/>xmlGetIntSubset ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlGetIntSubset (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
1221</pre><p>Get the internal subset of a document</p>
1222<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the DTD structure or NULL if not found</td></tr></tbody></table></div></div>
1223 <hr/>
1224 <div class="refsect2" lang="en"><h3><a name="xmlGetLastChild"/>xmlGetLastChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlGetLastChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br/>
1225</pre><p>Search the last child of a node.</p>
1226<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last child or NULL if none.</td></tr></tbody></table></div></div>
1227 <hr/>
1228 <div class="refsect2" lang="en"><h3><a name="xmlGetLineNo"/>xmlGetLineNo ()</h3><pre class="programlisting">long xmlGetLineNo (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
1229</pre><p>Get line number of @node. This requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1)</p>
1230<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>valid node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the line number if successful, -1 otherwise</td></tr></tbody></table></div></div>
1231 <hr/>
1232 <div class="refsect2" lang="en"><h3><a name="xmlGetNoNsProp"/>xmlGetNoNsProp ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNoNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
1233</pre><p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off. This function is similar to <a href="libxml2-tree.html#xmlGetProp">xmlGetProp</a> except it will accept only an <a href="libxml2-SAX.html#attribute">attribute</a> in no namespace.</p>
1234<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value or NULL if not found. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
1235 <hr/>
1236 <div class="refsect2" lang="en"><h3><a name="xmlGetNodePath"/>xmlGetNodePath ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNodePath (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
1237</pre><p>Build a structure based Path for the given node</p>
1238<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new path or NULL in case of error. The caller must free the returned string</td></tr></tbody></table></div></div>
1239 <hr/>
1240 <div class="refsect2" lang="en"><h3><a name="xmlGetNsList"/>xmlGetNsList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * xmlGetNsList (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
1241</pre><p>Search all the namespace applying to a given element.</p>
1242<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an NULL terminated array of all the #xmlNsPtr found that need to be freed by the caller or NULL if no namespace if defined</td></tr></tbody></table></div></div>
1243 <hr/>
1244 <div class="refsect2" lang="en"><h3><a name="xmlGetNsProp"/>xmlGetNsProp ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br/>
1245</pre><p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This <a href="libxml2-SAX.html#attribute">attribute</a> has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off.</p>
1246<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the URI of the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value or NULL if not found. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
1247 <hr/>
1248 <div class="refsect2" lang="en"><h3><a name="xmlGetProp"/>xmlGetProp ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
1249</pre><p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off. NOTE: this function acts independently of namespaces associated to the attribute. Use xmlGetNsProp() or xmlGetNoNsProp() for namespace aware processing.</p>
1250<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value or NULL if not found. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
1251 <hr/>
1252 <div class="refsect2" lang="en"><h3><a name="xmlHasNsProp"/>xmlHasNsProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlHasNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br/>
1253</pre><p>Search for an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This <a href="libxml2-SAX.html#attribute">attribute</a> has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off. Note that a namespace of NULL indicates to use the default namespace.</p>
1254<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the URI of the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> or the <a href="libxml2-SAX.html#attribute">attribute</a> declaration or NULL if neither was found.</td></tr></tbody></table></div></div>
1255 <hr/>
1256 <div class="refsect2" lang="en"><h3><a name="xmlHasProp"/>xmlHasProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlHasProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
1257</pre><p>Search an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This function also looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off.</p>
1258<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> or the <a href="libxml2-SAX.html#attribute">attribute</a> declaration or NULL if neither was found.</td></tr></tbody></table></div></div>
1259 <hr/>
1260 <div class="refsect2" lang="en"><h3><a name="xmlIsBlankNode"/>xmlIsBlankNode ()</h3><pre class="programlisting">int xmlIsBlankNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
1261</pre><p>Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.</p>
1262<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 yes, 0 no</td></tr></tbody></table></div></div>
1263 <hr/>
1264 <div class="refsect2" lang="en"><h3><a name="xmlIsXHTML"/>xmlIsXHTML ()</h3><pre class="programlisting">int xmlIsXHTML (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicID)<br/>
1265</pre><p>Try to find if the document correspond to an XHTML DTD</p>
1266<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>systemID</tt></i>:</span></td><td>the system identifier</td></tr><tr><td><span class="term"><i><tt>publicID</tt></i>:</span></td><td>the public identifier</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if not and -1 in case of error</td></tr></tbody></table></div></div>
1267 <hr/>
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +00001268 <div class="refsect2" lang="en"><h3><a name="xmlLastElementChild"/>xmlLastElementChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlLastElementChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br/>
1269</pre><p>Finds the last child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
1270<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last element child or NULL if not available</td></tr></tbody></table></div></div>
1271 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001272 <div class="refsect2" lang="en"><h3><a name="xmlNewCDataBlock"/>xmlNewCDataBlock ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewCDataBlock (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
1273</pre><p>Creation of a new node containing a CDATA block.</p>
1274<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the CDATA block content content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the block</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1275 <hr/>
1276 <div class="refsect2" lang="en"><h3><a name="xmlNewCharRef"/>xmlNewCharRef ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewCharRef (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
1277</pre><p>Creation of a new character <a href="libxml2-SAX.html#reference">reference</a> node.</p>
1278<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the char ref string, starting with # or "&amp;# ... ;"</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1279 <hr/>
1280 <div class="refsect2" lang="en"><h3><a name="xmlNewChild"/>xmlNewChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1281</pre><p>Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references. XML special chars must be escaped first by using xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used.</p>
1282<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the child</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the XML content of the child if any.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1283 <hr/>
1284 <div class="refsect2" lang="en"><h3><a name="xmlNewComment"/>xmlNewComment ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewComment (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1285</pre><p>Creation of a new node containing a comment.</p>
1286<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#comment">comment</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1287 <hr/>
1288 <div class="refsect2" lang="en"><h3><a name="xmlNewDoc"/>xmlNewDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlNewDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version)<br/>
1289</pre><p>Creates a new XML document</p>
1290<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string giving the version of XML "1.0"</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new document</td></tr></tbody></table></div></div>
1291 <hr/>
1292 <div class="refsect2" lang="en"><h3><a name="xmlNewDocComment"/>xmlNewDocComment ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocComment (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1293</pre><p>Creation of a new node containing a <a href="libxml2-SAX.html#comment">comment</a> within a document.</p>
1294<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#comment">comment</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1295 <hr/>
1296 <div class="refsect2" lang="en"><h3><a name="xmlNewDocFragment"/>xmlNewDocFragment ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocFragment (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
1297</pre><p>Creation of a new Fragment node.</p>
1298<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document owning the fragment</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1299 <hr/>
1300 <div class="refsect2" lang="en"><h3><a name="xmlNewDocNode"/>xmlNewDocNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocNode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1301</pre><p>Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.</p>
1302<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the XML text content if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1303 <hr/>
1304 <div class="refsect2" lang="en"><h3><a name="xmlNewDocNodeEatName"/>xmlNewDocNodeEatName ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocNodeEatName (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1305</pre><p>Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.</p>
1306<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the XML text content if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1307 <hr/>
1308 <div class="refsect2" lang="en"><h3><a name="xmlNewDocPI"/>xmlNewDocPI ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocPI (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1309</pre><p>Creation of a processing instruction element.</p>
1310<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the target document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the processing instruction name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the PI content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1311 <hr/>
1312 <div class="refsect2" lang="en"><h3><a name="xmlNewDocProp"/>xmlNewDocProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewDocProp (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
1313</pre><p>Create a new property carried by a document.</p>
1314<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
1315 <hr/>
1316 <div class="refsect2" lang="en"><h3><a name="xmlNewDocRawNode"/>xmlNewDocRawNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocRawNode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1317</pre><p>Creation of a new node element within a document. @ns and @content are optional (NULL).</p>
1318<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1319 <hr/>
1320 <div class="refsect2" lang="en"><h3><a name="xmlNewDocText"/>xmlNewDocText ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocText (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1321</pre><p>Creation of a new text node within a document.</p>
1322<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1323 <hr/>
1324 <div class="refsect2" lang="en"><h3><a name="xmlNewDocTextLen"/>xmlNewDocTextLen ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocTextLen (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
1325</pre><p>Creation of a new text node with an extra content length parameter. The text node pertain to a given document.</p>
1326<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the text len.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1327 <hr/>
1328 <div class="refsect2" lang="en"><h3><a name="xmlNewDtd"/>xmlNewDtd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlNewDtd (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
1329</pre><p>Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset().</p>
1330<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div></div>
1331 <hr/>
1332 <div class="refsect2" lang="en"><h3><a name="xmlNewGlobalNs"/>xmlNewGlobalNs ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewGlobalNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
Daniel Veillard67952602006-01-05 15:29:44 +00001333</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001334<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL this functionality had been removed</td></tr></tbody></table></div></div>
1335 <hr/>
1336 <div class="refsect2" lang="en"><h3><a name="xmlNewNode"/>xmlNewNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNode (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
1337</pre><p>Creation of a new node element. @ns is optional (NULL).</p>
1338<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object. Uses xmlStrdup() to make copy of @name.</td></tr></tbody></table></div></div>
1339 <hr/>
1340 <div class="refsect2" lang="en"><h3><a name="xmlNewNodeEatName"/>xmlNewNodeEatName ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNodeEatName (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
1341</pre><p>Creation of a new node element. @ns is optional (NULL).</p>
1342<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object, with pointer @name as new node's name. Use xmlNewNode() if a copy of @name string is is needed as new node's name.</td></tr></tbody></table></div></div>
1343 <hr/>
1344 <div class="refsect2" lang="en"><h3><a name="xmlNewNs"/>xmlNewNs ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewNs (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
1345</pre><p>Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node. We use href==NULL in the case of an element creation where the namespace was not defined.</p>
1346<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the element carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new namespace pointer or NULL</td></tr></tbody></table></div></div>
1347 <hr/>
1348 <div class="refsect2" lang="en"><h3><a name="xmlNewNsProp"/>xmlNewNsProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
1349</pre><p>Create a new property tagged with a namespace and carried by a node.</p>
1350<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the holding node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
1351 <hr/>
1352 <div class="refsect2" lang="en"><h3><a name="xmlNewNsPropEatName"/>xmlNewNsPropEatName ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewNsPropEatName (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
1353</pre><p>Create a new property tagged with a namespace and carried by a node.</p>
1354<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the holding node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
1355 <hr/>
1356 <div class="refsect2" lang="en"><h3><a name="xmlNewPI"/>xmlNewPI ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewPI (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1357</pre><p>Creation of a processing instruction element. Use xmlDocNewPI preferably to get string interning</p>
1358<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the processing instruction name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the PI content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1359 <hr/>
1360 <div class="refsect2" lang="en"><h3><a name="xmlNewProp"/>xmlNewProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
1361</pre><p>Create a new property carried by a node.</p>
1362<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the holding node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
1363 <hr/>
1364 <div class="refsect2" lang="en"><h3><a name="xmlNewReference"/>xmlNewReference ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewReference (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
1365</pre><p>Creation of a new <a href="libxml2-SAX.html#reference">reference</a> node.</p>
1366<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#reference">reference</a> name, or the <a href="libxml2-SAX.html#reference">reference</a> string with &amp; and ;</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1367 <hr/>
1368 <div class="refsect2" lang="en"><h3><a name="xmlNewText"/>xmlNewText ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewText (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1369</pre><p>Creation of a new text node.</p>
1370<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1371 <hr/>
1372 <div class="refsect2" lang="en"><h3><a name="xmlNewTextChild"/>xmlNewTextChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewTextChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
1373</pre><p>Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child TEXT node will be created containing the string @content. NOTE: Use xmlNewChild() if @content will contain entities that need to be preserved. Use this function, xmlNewTextChild(), if you need to ensure that reserved XML chars that might appear in @content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations.</p>
1374<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the child</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content of the child if any.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1375 <hr/>
1376 <div class="refsect2" lang="en"><h3><a name="xmlNewTextLen"/>xmlNewTextLen ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewTextLen (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
1377</pre><p>Creation of a new text node with an extra parameter for the content's length</p>
1378<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the text len.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
1379 <hr/>
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +00001380 <div class="refsect2" lang="en"><h3><a name="xmlNextElementSibling"/>xmlNextElementSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNextElementSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
1381</pre><p>Finds the first closest next sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
1382<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element sibling or NULL if not available</td></tr></tbody></table></div></div>
1383 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001384 <div class="refsect2" lang="en"><h3><a name="xmlNodeAddContent"/>xmlNodeAddContent ()</h3><pre class="programlisting">void xmlNodeAddContent (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
Daniel Veillardfe3970e2006-11-23 16:08:30 +00001385</pre><p>Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001386<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>extra content</td></tr></tbody></table></div></div>
1387 <hr/>
1388 <div class="refsect2" lang="en"><h3><a name="xmlNodeAddContentLen"/>xmlNodeAddContentLen ()</h3><pre class="programlisting">void xmlNodeAddContentLen (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
Daniel Veillardfe3970e2006-11-23 16:08:30 +00001389</pre><p>Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001390<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>extra content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size of @content</td></tr></tbody></table></div></div>
1391 <hr/>
1392 <div class="refsect2" lang="en"><h3><a name="xmlNodeBufGetContent"/>xmlNodeBufGetContent ()</h3><pre class="programlisting">int xmlNodeBufGetContent (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
1393</pre><p>Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value</p>
1394<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
1395 <hr/>
1396 <div class="refsect2" lang="en"><h3><a name="xmlNodeDump"/>xmlNodeDump ()</h3><pre class="programlisting">int xmlNodeDump (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format)<br/>
Daniel Veillard28cc42d2012-08-10 10:00:18 +08001397</pre><p>Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called Since this is using <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead.</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001398<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written to the buffer or -1 in case of error</td></tr></tbody></table></div></div>
1399 <hr/>
1400 <div class="refsect2" lang="en"><h3><a name="xmlNodeDumpOutput"/>xmlNodeDumpOutput ()</h3><pre class="programlisting">void xmlNodeDumpOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format, <br/> const char * encoding)<br/>
1401</pre><p>Dump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
1402<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>an optional encoding string</td></tr></tbody></table></div></div>
1403 <hr/>
1404 <div class="refsect2" lang="en"><h3><a name="xmlNodeGetBase"/>xmlNodeGetBase ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetBase (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
Daniel Veillardbb5055f2010-03-15 16:21:00 +01001405</pre><p>Searches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different. It returns the base as defined in RFC 2396 sections 5.1.1. Base URI within Document Content and 5.1.2. Base URI from the Encapsulating Entity However it does not return the document base (5.1.3), use doc-&gt;URL in this case</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001406<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document the node pertains to</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being checked</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the base URL, or NULL if not found It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
1407 <hr/>
1408 <div class="refsect2" lang="en"><h3><a name="xmlNodeGetContent"/>xmlNodeGetContent ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetContent (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
1409</pre><p>Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted.</p>
1410<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlChar * or NULL if no content is available. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
1411 <hr/>
1412 <div class="refsect2" lang="en"><h3><a name="xmlNodeGetLang"/>xmlNodeGetLang ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetLang (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
1413</pre><p>Searches the language of a node, i.e. the values of the xml:lang <a href="libxml2-SAX.html#attribute">attribute</a> or the one carried by the nearest ancestor.</p>
1414<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being checked</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the lang value, or NULL if not found It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
1415 <hr/>
1416 <div class="refsect2" lang="en"><h3><a name="xmlNodeGetSpacePreserve"/>xmlNodeGetSpacePreserve ()</h3><pre class="programlisting">int xmlNodeGetSpacePreserve (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
1417</pre><p>Searches the space preserving behaviour of a node, i.e. the values of the xml:space <a href="libxml2-SAX.html#attribute">attribute</a> or the one carried by the nearest ancestor.</p>
1418<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being checked</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if xml:space is not inherited, 0 if "default", 1 if "preserve"</td></tr></tbody></table></div></div>
1419 <hr/>
1420 <div class="refsect2" lang="en"><h3><a name="xmlNodeIsText"/>xmlNodeIsText ()</h3><pre class="programlisting">int xmlNodeIsText (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
1421</pre><p>Is this node a Text node ?</p>
1422<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 yes, 0 no</td></tr></tbody></table></div></div>
1423 <hr/>
1424 <div class="refsect2" lang="en"><h3><a name="xmlNodeListGetRawString"/>xmlNodeListGetRawString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeListGetRawString (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br/> int inLine)<br/>
1425</pre><p>Builds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling.</p>
1426<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>a Node list</td></tr><tr><td><span class="term"><i><tt>inLine</tt></i>:</span></td><td>should we replace entity contents or show their external form</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the string copy, the caller must free it with xmlFree().</td></tr></tbody></table></div></div>
1427 <hr/>
1428 <div class="refsect2" lang="en"><h3><a name="xmlNodeListGetString"/>xmlNodeListGetString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeListGetString (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br/> int inLine)<br/>
1429</pre><p>Build the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs</p>
1430<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>a Node list</td></tr><tr><td><span class="term"><i><tt>inLine</tt></i>:</span></td><td>should we replace entity contents or show their external form</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the string copy, the caller must free it with xmlFree().</td></tr></tbody></table></div></div>
1431 <hr/>
1432 <div class="refsect2" lang="en"><h3><a name="xmlNodeSetBase"/>xmlNodeSetBase ()</h3><pre class="programlisting">void xmlNodeSetBase (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * uri)<br/>
1433</pre><p>Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute.</p>
1434<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>the new base URI</td></tr></tbody></table></div></div>
1435 <hr/>
1436 <div class="refsect2" lang="en"><h3><a name="xmlNodeSetContent"/>xmlNodeSetContent ()</h3><pre class="programlisting">void xmlNodeSetContent (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
Daniel Veillardfe3970e2006-11-23 16:08:30 +00001437</pre><p>Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001438<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the new value of the content</td></tr></tbody></table></div></div>
1439 <hr/>
1440 <div class="refsect2" lang="en"><h3><a name="xmlNodeSetContentLen"/>xmlNodeSetContentLen ()</h3><pre class="programlisting">void xmlNodeSetContentLen (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
Daniel Veillardfe3970e2006-11-23 16:08:30 +00001441</pre><p>Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001442<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the new value of the content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size of @content</td></tr></tbody></table></div></div>
1443 <hr/>
1444 <div class="refsect2" lang="en"><h3><a name="xmlNodeSetLang"/>xmlNodeSetLang ()</h3><pre class="programlisting">void xmlNodeSetLang (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * lang)<br/>
1445</pre><p>Set the language of a node, i.e. the values of the xml:lang attribute.</p>
1446<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>lang</tt></i>:</span></td><td>the language description</td></tr></tbody></table></div></div>
1447 <hr/>
1448 <div class="refsect2" lang="en"><h3><a name="xmlNodeSetName"/>xmlNodeSetName ()</h3><pre class="programlisting">void xmlNodeSetName (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
1449</pre><p>Set (or reset) the name of a node.</p>
1450<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the new tag name</td></tr></tbody></table></div></div>
1451 <hr/>
1452 <div class="refsect2" lang="en"><h3><a name="xmlNodeSetSpacePreserve"/>xmlNodeSetSpacePreserve ()</h3><pre class="programlisting">void xmlNodeSetSpacePreserve (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int val)<br/>
1453</pre><p>Set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space attribute.</p>
1454<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the xml:space value ("0": default, 1: "preserve")</td></tr></tbody></table></div></div>
1455 <hr/>
Daniel Veillardbe2bd6a2008-11-27 15:26:28 +00001456 <div class="refsect2" lang="en"><h3><a name="xmlPreviousElementSibling"/>xmlPreviousElementSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlPreviousElementSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
1457</pre><p>Finds the first closest previous sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
1458<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous element sibling or NULL if not available</td></tr></tbody></table></div></div>
1459 <hr/>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001460 <div class="refsect2" lang="en"><h3><a name="xmlReconciliateNs"/>xmlReconciliateNs ()</h3><pre class="programlisting">int xmlReconciliateNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree)<br/>
1461</pre><p>This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree.</p>
1462<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node defining the subtree to reconciliate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of namespace declarations created or -1 in case of error.</td></tr></tbody></table></div></div>
1463 <hr/>
1464 <div class="refsect2" lang="en"><h3><a name="xmlRemoveProp"/>xmlRemoveProp ()</h3><pre class="programlisting">int xmlRemoveProp (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
1465</pre><p>Unlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes</p>
1466<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success and -1 in case of error.</td></tr></tbody></table></div></div>
1467 <hr/>
1468 <div class="refsect2" lang="en"><h3><a name="xmlReplaceNode"/>xmlReplaceNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlReplaceNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> old, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
1469</pre><p>Unlink the old node from its current context, prune the new one at the same place. If @cur was already inserted in a document it is first unlinked from its existing context.</p>
1470<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>old</tt></i>:</span></td><td>the old node</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the @old node</td></tr></tbody></table></div></div>
1471 <hr/>
1472 <div class="refsect2" lang="en"><h3><a name="xmlSaveFile"/>xmlSaveFile ()</h3><pre class="programlisting">int xmlSaveFile (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
1473</pre><p>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used.</p>
1474<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
1475 <hr/>
1476 <div class="refsect2" lang="en"><h3><a name="xmlSaveFileEnc"/>xmlSaveFileEnc ()</h3><pre class="programlisting">int xmlSaveFileEnc (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding)<br/>
1477</pre><p>Dump an XML document, converting it to the given encoding</p>
1478<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the name of an encoding (or NULL)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
1479 <hr/>
1480 <div class="refsect2" lang="en"><h3><a name="xmlSaveFileTo"/>xmlSaveFileTo ()</h3><pre class="programlisting">int xmlSaveFileTo (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding)<br/>
1481</pre><p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p>
1482<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output I/O buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding if any assuming the I/O layer handles the trancoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
1483 <hr/>
1484 <div class="refsect2" lang="en"><h3><a name="xmlSaveFormatFile"/>xmlSaveFormatFile ()</h3><pre class="programlisting">int xmlSaveFormatFile (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> int format)<br/>
1485</pre><p>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. If @format is set then the document will be indented on output. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
1486<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
1487 <hr/>
1488 <div class="refsect2" lang="en"><h3><a name="xmlSaveFormatFileEnc"/>xmlSaveFormatFileEnc ()</h3><pre class="programlisting">int xmlSaveFormatFileEnc (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
1489</pre><p>Dump an XML document to a file or an URL.</p>
1490<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URL to output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document being saved</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the name of the encoding to use or NULL.</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces be added.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</td></tr></tbody></table></div></div>
1491 <hr/>
1492 <div class="refsect2" lang="en"><h3><a name="xmlSaveFormatFileTo"/>xmlSaveFormatFileTo ()</h3><pre class="programlisting">int xmlSaveFormatFileTo (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
1493</pre><p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p>
1494<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output I/O buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding if any assuming the I/O layer handles the trancoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
1495 <hr/>
1496 <div class="refsect2" lang="en"><h3><a name="xmlSearchNs"/>xmlSearchNs ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br/>
1497</pre><p>Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. @nameSpace can be NULL, this is a search for the default namespace. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case.</p>
1498<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace pointer or NULL.</td></tr></tbody></table></div></div>
1499 <hr/>
1500 <div class="refsect2" lang="en"><h3><a name="xmlSearchNsByHref"/>xmlSearchNsByHref ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNsByHref (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href)<br/>
1501</pre><p>Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise.</p>
1502<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the namespace value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace pointer or NULL.</td></tr></tbody></table></div></div>
1503 <hr/>
1504 <div class="refsect2" lang="en"><h3><a name="xmlSetBufferAllocationScheme"/>xmlSetBufferAllocationScheme ()</h3><pre class="programlisting">void xmlSetBufferAllocationScheme (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)<br/>
1505</pre><p>Set the buffer allocation method. Types are <a href="libxml2-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> - use exact sizes, keeps memory usage down <a href="libxml2-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> - double buffer when extra needed, improves performance</p>
1506<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>scheme</tt></i>:</span></td><td>allocation method to use</td></tr></tbody></table></div></div>
1507 <hr/>
1508 <div class="refsect2" lang="en"><h3><a name="xmlSetCompressMode"/>xmlSetCompressMode ()</h3><pre class="programlisting">void xmlSetCompressMode (int mode)<br/>
1509</pre><p>set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</p>
1510<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the compression ratio</td></tr></tbody></table></div></div>
1511 <hr/>
1512 <div class="refsect2" lang="en"><h3><a name="xmlSetDocCompressMode"/>xmlSetDocCompressMode ()</h3><pre class="programlisting">void xmlSetDocCompressMode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int mode)<br/>
1513</pre><p>set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</p>
1514<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the compression ratio</td></tr></tbody></table></div></div>
1515 <hr/>
1516 <div class="refsect2" lang="en"><h3><a name="xmlSetListDoc"/>xmlSetListDoc ()</h3><pre class="programlisting">void xmlSetListDoc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
1517</pre><p>update all nodes in the list to point to the right document</p>
1518<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>the first element</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
1519 <hr/>
1520 <div class="refsect2" lang="en"><h3><a name="xmlSetNs"/>xmlSetNs ()</h3><pre class="programlisting">void xmlSetNs (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns)<br/>
1521</pre><p>Associate a namespace to a node, a posteriori.</p>
1522<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node in the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a namespace pointer</td></tr></tbody></table></div></div>
1523 <hr/>
1524 <div class="refsect2" lang="en"><h3><a name="xmlSetNsProp"/>xmlSetNsProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlSetNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
Daniel Veillardb2f8f1d2006-04-28 16:30:48 +00001525</pre><p>Set (or reset) an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node. The ns structure must be in scope, this is not checked</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001526<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace definition</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> pointer.</td></tr></tbody></table></div></div>
1527 <hr/>
1528 <div class="refsect2" lang="en"><h3><a name="xmlSetProp"/>xmlSetProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlSetProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
Daniel Veillardb2f8f1d2006-04-28 16:30:48 +00001529</pre><p>Set (or reset) an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node. If @name has a prefix, then the corresponding namespace-binding will be used, if in scope; it is an error it there's no such ns-binding for the prefix in scope.</p>
1530<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name (a QName)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> pointer.</td></tr></tbody></table></div></div>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001531 <hr/>
1532 <div class="refsect2" lang="en"><h3><a name="xmlSetTreeDoc"/>xmlSetTreeDoc ()</h3><pre class="programlisting">void xmlSetTreeDoc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
1533</pre><p>update all nodes under the tree to point to the right document</p>
1534<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the top element</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
1535 <hr/>
1536 <div class="refsect2" lang="en"><h3><a name="xmlSplitQName2"/>xmlSplitQName2 ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName2 (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix)<br/>
1537</pre><p>parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</p>
1538<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> **</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not a QName, otherwise the local part, and prefix is updated to get the Prefix if any.</td></tr></tbody></table></div></div>
1539 <hr/>
1540 <div class="refsect2" lang="en"><h3><a name="xmlSplitQName3"/>xmlSplitQName3 ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName3 (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int * len)<br/>
1541</pre><p>parse an XML qualified name string,i</p>
1542<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an int *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if it is not a Qualified Name, otherwise, update len with the lenght in byte of the prefix and return a pointer to the start of the name without the prefix</td></tr></tbody></table></div></div>
1543 <hr/>
1544 <div class="refsect2" lang="en"><h3><a name="xmlStringGetNodeList"/>xmlStringGetNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringGetNodeList (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
1545</pre><p>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</p>
1546<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the first child</td></tr></tbody></table></div></div>
1547 <hr/>
1548 <div class="refsect2" lang="en"><h3><a name="xmlStringLenGetNodeList"/>xmlStringLenGetNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringLenGetNodeList (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len)<br/>
1549</pre><p>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</p>
1550<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the text</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the string value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the first child</td></tr></tbody></table></div></div>
1551 <hr/>
1552 <div class="refsect2" lang="en"><h3><a name="xmlTextConcat"/>xmlTextConcat ()</h3><pre class="programlisting">int xmlTextConcat (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
1553</pre><p>Concat the given string at the end of the existing node content</p>
1554<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>@content length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div></div>
1555 <hr/>
1556 <div class="refsect2" lang="en"><h3><a name="xmlTextMerge"/>xmlTextMerge ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextMerge (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> first, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> second)<br/>
1557</pre><p>Merge two text nodes into one</p>
1558<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>first</tt></i>:</span></td><td>the first text node</td></tr><tr><td><span class="term"><i><tt>second</tt></i>:</span></td><td>the second text node being merged</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the first text node augmented</td></tr></tbody></table></div></div>
1559 <hr/>
1560 <div class="refsect2" lang="en"><h3><a name="xmlUnlinkNode"/>xmlUnlinkNode ()</h3><pre class="programlisting">void xmlUnlinkNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
Daniel Veillard28cc42d2012-08-10 10:00:18 +08001561</pre><p>Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can't be unlinked as they do not have pointer to their parent.</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001562<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node</td></tr></tbody></table></div></div>
1563 <hr/>
1564 <div class="refsect2" lang="en"><h3><a name="xmlUnsetNsProp"/>xmlUnsetNsProp ()</h3><pre class="programlisting">int xmlUnsetNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
1565</pre><p>Remove an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node.</p>
1566<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace definition</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 if not found</td></tr></tbody></table></div></div>
1567 <hr/>
1568 <div class="refsect2" lang="en"><h3><a name="xmlUnsetProp"/>xmlUnsetProp ()</h3><pre class="programlisting">int xmlUnsetProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
Daniel Veillardb2f8f1d2006-04-28 16:30:48 +00001569</pre><p>Remove an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node. This handles only attributes in no namespace.</p>
Daniel Veillard1db4a662005-09-12 13:10:09 +00001570<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 if not found</td></tr></tbody></table></div></div>
1571 <hr/>
1572 <div class="refsect2" lang="en"><h3><a name="xmlValidateNCName"/>xmlValidateNCName ()</h3><pre class="programlisting">int xmlValidateNCName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space)<br/>
1573</pre><p>Check that a value conforms to the lexical space of NCName</p>
1574<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
1575 <hr/>
1576 <div class="refsect2" lang="en"><h3><a name="xmlValidateNMToken"/>xmlValidateNMToken ()</h3><pre class="programlisting">int xmlValidateNMToken (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space)<br/>
1577</pre><p>Check that a value conforms to the lexical space of NMToken</p>
1578<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
1579 <hr/>
1580 <div class="refsect2" lang="en"><h3><a name="xmlValidateName"/>xmlValidateName ()</h3><pre class="programlisting">int xmlValidateName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space)<br/>
1581</pre><p>Check that a value conforms to the lexical space of Name</p>
1582<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
1583 <hr/>
1584 <div class="refsect2" lang="en"><h3><a name="xmlValidateQName"/>xmlValidateQName ()</h3><pre class="programlisting">int xmlValidateQName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space)<br/>
1585</pre><p>Check that a value conforms to the lexical space of QName</p>
1586<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
1587 <hr/>
1588 </div>
1589 </div>
1590 </body>
1591</html>