|
1 /* |
|
2 * Summary: interfaces for tree manipulation |
|
3 * Description: this module describes the structures found in an tree resulting |
|
4 * from an XML or HTML parsing, as well as the API provided for |
|
5 * various processing on that tree |
|
6 * |
|
7 * Copy: See Copyright for the status of this software. |
|
8 * |
|
9 * Author: Daniel Veillard |
|
10 * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
11 */ |
|
12 |
|
13 /** @file |
|
14 @publishedAll |
|
15 @released |
|
16 */ |
|
17 |
|
18 #ifndef XML_TREE_H |
|
19 #define XML_TREE_H |
|
20 |
|
21 #include <stdapis/libxml2/libxml2_xmlstring.h> |
|
22 |
|
23 #include <stdlib.h> |
|
24 #include <stdio.h> |
|
25 |
|
26 #ifdef LIBXML_REGEXP_ENABLED |
|
27 #include "libxml2_xmlregexp.h" |
|
28 #endif |
|
29 |
|
30 #ifdef __cplusplus |
|
31 extern "C" { |
|
32 #endif |
|
33 |
|
34 /* |
|
35 * Some of the basic types pointer to structures: |
|
36 */ |
|
37 /* xmlIO.h */ |
|
38 typedef struct _xmlParserInputBuffer xmlParserInputBuffer; |
|
39 typedef xmlParserInputBuffer *xmlParserInputBufferPtr; |
|
40 |
|
41 typedef struct _xmlOutputBuffer xmlOutputBuffer; |
|
42 typedef xmlOutputBuffer *xmlOutputBufferPtr; |
|
43 |
|
44 /* parser.h */ |
|
45 |
|
46 |
|
47 typedef struct _xmlParserCtxt xmlParserCtxt; |
|
48 typedef xmlParserCtxt *xmlParserCtxtPtr; |
|
49 |
|
50 typedef struct _xmlSAXLocator xmlSAXLocator; |
|
51 typedef xmlSAXLocator *xmlSAXLocatorPtr; |
|
52 |
|
53 typedef struct _xmlSAXHandler xmlSAXHandler; |
|
54 typedef xmlSAXHandler *xmlSAXHandlerPtr; |
|
55 |
|
56 /* entities.h */ |
|
57 typedef struct _xmlEntity xmlEntity; |
|
58 typedef xmlEntity *xmlEntityPtr; |
|
59 |
|
60 /** |
|
61 * BASE_BUFFER_SIZE: |
|
62 * |
|
63 * default buffer size 4000. |
|
64 */ |
|
65 #define BASE_BUFFER_SIZE 4096 |
|
66 |
|
67 |
|
68 // BUT! remember that it is checked in #ifdef's |
|
69 /** |
|
70 * XML_XML_NAMESPACE: |
|
71 * |
|
72 * This is the namespace for the special xml: prefix predefined in the |
|
73 * XML Namespace specification. |
|
74 */ |
|
75 #define XML_XML_NAMESPACE \ |
|
76 (const xmlChar *) "http://www.w3.org/XML/1998/namespace" |
|
77 |
|
78 /** |
|
79 * XML_XML_ID: |
|
80 * |
|
81 * This is the name for the special xml:id attribute |
|
82 */ |
|
83 #define XML_XML_ID (const xmlChar *) "xml:id" |
|
84 |
|
85 /* |
|
86 * The different element types carried by an XML tree. |
|
87 * |
|
88 * NOTE: This is synchronized with DOM Level1 values |
|
89 * See http://www.w3.org/TR/REC-DOM-Level-1/ |
|
90 * |
|
91 * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should |
|
92 * be deprecated to use an XML_DTD_NODE. |
|
93 */ |
|
94 typedef enum { |
|
95 XML_ELEMENT_NODE= 1, |
|
96 XML_ATTRIBUTE_NODE= 2, |
|
97 XML_TEXT_NODE= 3, |
|
98 XML_CDATA_SECTION_NODE= 4, |
|
99 XML_ENTITY_REF_NODE= 5, |
|
100 XML_ENTITY_NODE= 6, |
|
101 XML_PI_NODE= 7, |
|
102 XML_COMMENT_NODE= 8, |
|
103 XML_DOCUMENT_NODE= 9, |
|
104 XML_DOCUMENT_TYPE_NODE= 10, |
|
105 XML_DOCUMENT_FRAG_NODE= 11, |
|
106 XML_NOTATION_NODE= 12, |
|
107 XML_HTML_DOCUMENT_NODE= 13, |
|
108 XML_DTD_NODE= 14, |
|
109 XML_ELEMENT_DECL= 15, |
|
110 XML_ATTRIBUTE_DECL= 16, |
|
111 XML_ENTITY_DECL= 17, |
|
112 XML_NAMESPACE_DECL= 18, |
|
113 XML_XINCLUDE_START= 19, |
|
114 XML_XINCLUDE_END= 20 |
|
115 //#ifdef LIBXML_DOCB_ENABLED |
|
116 // ,XML_DOCB_DOCUMENT_NODE= 21 //DocBook support is excluded from XML Engine |
|
117 //#endif |
|
118 } xmlElementType; |
|
119 |
|
120 |
|
121 /** |
|
122 * xmlNotation: |
|
123 * |
|
124 * A DTD Notation definition. |
|
125 */ |
|
126 |
|
127 typedef struct _xmlNotation xmlNotation; |
|
128 typedef xmlNotation *xmlNotationPtr; |
|
129 struct _xmlNotation { |
|
130 const xmlChar *name; /* Notation name */ |
|
131 const xmlChar *PublicID; /* Public identifier, if any */ |
|
132 const xmlChar *SystemID; /* System identifier, if any */ |
|
133 }; |
|
134 |
|
135 /** |
|
136 * xmlAttributeType: |
|
137 * |
|
138 * A DTD Attribute type definition. |
|
139 */ |
|
140 |
|
141 typedef enum { |
|
142 XML_ATTRIBUTE_CDATA = 1, |
|
143 XML_ATTRIBUTE_ID, |
|
144 XML_ATTRIBUTE_IDREF , |
|
145 XML_ATTRIBUTE_IDREFS, |
|
146 XML_ATTRIBUTE_ENTITY, |
|
147 XML_ATTRIBUTE_ENTITIES, |
|
148 XML_ATTRIBUTE_NMTOKEN, |
|
149 XML_ATTRIBUTE_NMTOKENS, |
|
150 XML_ATTRIBUTE_ENUMERATION, |
|
151 XML_ATTRIBUTE_NOTATION |
|
152 } xmlAttributeType; |
|
153 |
|
154 /** |
|
155 * xmlAttributeDefault: |
|
156 * |
|
157 * A DTD Attribute default definition. |
|
158 */ |
|
159 |
|
160 typedef enum { |
|
161 XML_ATTRIBUTE_NONE = 1, |
|
162 XML_ATTRIBUTE_REQUIRED, |
|
163 XML_ATTRIBUTE_IMPLIED, |
|
164 XML_ATTRIBUTE_FIXED |
|
165 } xmlAttributeDefault; |
|
166 |
|
167 /** |
|
168 * xmlEnumeration: |
|
169 * |
|
170 * List structure used when there is an enumeration in DTDs. |
|
171 */ |
|
172 |
|
173 typedef struct _xmlEnumeration xmlEnumeration; |
|
174 typedef xmlEnumeration *xmlEnumerationPtr; |
|
175 struct _xmlEnumeration { |
|
176 struct _xmlEnumeration *next; /* next one */ |
|
177 const xmlChar *name; /* Enumeration name */ |
|
178 }; |
|
179 |
|
180 /** |
|
181 * xmlAttribute: |
|
182 * |
|
183 * An Attribute declaration in a DTD. |
|
184 */ |
|
185 |
|
186 typedef struct _xmlAttribute xmlAttribute; |
|
187 typedef xmlAttribute *xmlAttributePtr; |
|
188 struct _xmlAttribute { |
|
189 void *_private; /* application data */ |
|
190 xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ |
|
191 const xmlChar *name; /* Attribute name */ |
|
192 struct _xmlNode *children; /* NULL */ |
|
193 struct _xmlNode *last; /* NULL */ |
|
194 struct _xmlDtd *parent; /* -> DTD */ |
|
195 struct _xmlNode *next; /* next sibling link */ |
|
196 struct _xmlNode *prev; /* previous sibling link */ |
|
197 struct _xmlDoc *doc; /* the containing document */ |
|
198 |
|
199 struct _xmlAttribute *nexth; /* next in hash table */ |
|
200 xmlAttributeType atype; /* The attribute type */ |
|
201 xmlAttributeDefault def; /* the default */ |
|
202 const xmlChar *defaultValue; /* or the default value */ |
|
203 xmlEnumerationPtr tree; /* or the enumeration tree if any */ |
|
204 const xmlChar *prefix; /* the namespace prefix if any */ |
|
205 const xmlChar *elem; /* Element holding the attribute */ |
|
206 }; |
|
207 |
|
208 /** |
|
209 * xmlElementContentType: |
|
210 * |
|
211 * Possible definitions of element content types. |
|
212 */ |
|
213 typedef enum { |
|
214 XML_ELEMENT_CONTENT_PCDATA = 1, |
|
215 XML_ELEMENT_CONTENT_ELEMENT, |
|
216 XML_ELEMENT_CONTENT_SEQ, |
|
217 XML_ELEMENT_CONTENT_OR |
|
218 } xmlElementContentType; |
|
219 |
|
220 /** |
|
221 * xmlElementContentOccur: |
|
222 * |
|
223 * Possible definitions of element content occurrences. |
|
224 */ |
|
225 typedef enum { |
|
226 XML_ELEMENT_CONTENT_ONCE = 1, |
|
227 XML_ELEMENT_CONTENT_OPT, |
|
228 XML_ELEMENT_CONTENT_MULT, |
|
229 XML_ELEMENT_CONTENT_PLUS |
|
230 } xmlElementContentOccur; |
|
231 |
|
232 /** |
|
233 * xmlElementContent: |
|
234 * |
|
235 * An XML Element content as stored after parsing an element definition |
|
236 * in a DTD. |
|
237 */ |
|
238 |
|
239 typedef struct _xmlElementContent xmlElementContent; |
|
240 typedef xmlElementContent *xmlElementContentPtr; |
|
241 struct _xmlElementContent { |
|
242 xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */ |
|
243 xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */ |
|
244 const xmlChar *name; /* Element name */ |
|
245 struct _xmlElementContent *c1; /* first child */ |
|
246 struct _xmlElementContent *c2; /* second child */ |
|
247 struct _xmlElementContent *parent; /* parent */ |
|
248 const xmlChar *prefix; /* Namespace prefix */ |
|
249 }; |
|
250 |
|
251 /** |
|
252 * xmlElementTypeVal: |
|
253 * |
|
254 * The different possibilities for an element content type. |
|
255 */ |
|
256 |
|
257 typedef enum { |
|
258 XML_ELEMENT_TYPE_UNDEFINED = 0, |
|
259 XML_ELEMENT_TYPE_EMPTY = 1, |
|
260 XML_ELEMENT_TYPE_ANY, |
|
261 XML_ELEMENT_TYPE_MIXED, |
|
262 XML_ELEMENT_TYPE_ELEMENT |
|
263 } xmlElementTypeVal; |
|
264 |
|
265 |
|
266 //#ifdef __cplusplus |
|
267 //} |
|
268 //#endif |
|
269 //#ifdef __cplusplus |
|
270 //extern "C" { |
|
271 //#endif |
|
272 |
|
273 /** |
|
274 * xmlElement: |
|
275 * |
|
276 * An XML Element declaration from a DTD. |
|
277 */ |
|
278 |
|
279 typedef struct _xmlElement xmlElement; |
|
280 typedef xmlElement *xmlElementPtr; |
|
281 struct _xmlElement { |
|
282 void *_private; /* application data */ |
|
283 xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ |
|
284 const xmlChar *name; /* Element name */ |
|
285 struct _xmlNode *children; /* NULL */ |
|
286 struct _xmlNode *last; /* NULL */ |
|
287 struct _xmlDtd *parent; /* -> DTD */ |
|
288 struct _xmlNode *next; /* next sibling link */ |
|
289 struct _xmlNode *prev; /* previous sibling link */ |
|
290 struct _xmlDoc *doc; /* the containing document */ |
|
291 |
|
292 xmlElementTypeVal etype; /* The type */ |
|
293 xmlElementContentPtr content; /* the allowed element content */ |
|
294 xmlAttributePtr attributes; /* List of the declared attributes */ |
|
295 const xmlChar *prefix; /* the namespace prefix if any */ |
|
296 #ifdef LIBXML_REGEXP_ENABLED |
|
297 xmlRegexpPtr contModel; /* the validating regexp */ |
|
298 #else |
|
299 void* contModel; |
|
300 #endif |
|
301 }; |
|
302 |
|
303 |
|
304 /** |
|
305 * XML_LOCAL_NAMESPACE: |
|
306 * |
|
307 * A namespace declaration node. |
|
308 */ |
|
309 #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL |
|
310 typedef xmlElementType xmlNsType; |
|
311 |
|
312 /** |
|
313 * xmlNs: |
|
314 * |
|
315 * An XML namespace. |
|
316 * Note that prefix == NULL is valid, it defines the default namespace |
|
317 * within the subtree (until overridden). |
|
318 * |
|
319 * xmlNsType is unified with xmlElementType. |
|
320 */ |
|
321 |
|
322 typedef struct _xmlNs xmlNs; |
|
323 typedef xmlNs *xmlNsPtr; |
|
324 struct _xmlNs { |
|
325 struct _xmlNs *next; /* next Ns link for this node */ |
|
326 xmlNsType type; /* global or local */ |
|
327 const xmlChar *href; /* URL for the namespace */ |
|
328 const xmlChar *prefix; /* prefix for the namespace */ |
|
329 void *_private; /* application data */ |
|
330 }; |
|
331 |
|
332 /** |
|
333 * xmlDtd: |
|
334 * |
|
335 * An XML DTD, as defined by <!DOCTYPE ... There is actually one for |
|
336 * the internal subset and for the external subset. |
|
337 */ |
|
338 typedef struct _xmlDtd xmlDtd; |
|
339 typedef xmlDtd *xmlDtdPtr; |
|
340 struct _xmlDtd { |
|
341 void *_private; /* application data */ |
|
342 xmlElementType type; /* XML_DTD_NODE, must be second ! */ |
|
343 const xmlChar *name; /* Name of the DTD */ |
|
344 struct _xmlNode *children; /* the value of the property link */ |
|
345 struct _xmlNode *last; /* last child link */ |
|
346 struct _xmlDoc *parent; /* child->parent link */ |
|
347 struct _xmlNode *next; /* next sibling link */ |
|
348 struct _xmlNode *prev; /* previous sibling link */ |
|
349 struct _xmlDoc *doc; /* the containing document */ |
|
350 |
|
351 /* End of common part */ |
|
352 void *notations; /* Hash table for notations if any */ |
|
353 void *elements; /* Hash table for elements if any */ |
|
354 void *attributes; /* Hash table for attributes if any */ |
|
355 void *entities; /* Hash table for entities if any */ |
|
356 const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ |
|
357 const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ |
|
358 void *pentities; /* Hash table for param entities if any */ |
|
359 }; |
|
360 |
|
361 /** |
|
362 * xmlAttr: |
|
363 * |
|
364 * An attribute on an XML node. |
|
365 */ |
|
366 typedef struct _xmlAttr xmlAttr; |
|
367 typedef xmlAttr *xmlAttrPtr; |
|
368 struct _xmlAttr { |
|
369 void *_private; /* application data */ |
|
370 xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ |
|
371 const xmlChar *name; /* the name of the property */ |
|
372 struct _xmlNode *children; /* the value of the property */ |
|
373 struct _xmlNode *last; /* NULL */ |
|
374 struct _xmlNode *parent; /* child->parent link */ |
|
375 struct _xmlAttr *next; /* next sibling link */ |
|
376 struct _xmlAttr *prev; /* previous sibling link */ |
|
377 struct _xmlDoc *doc; /* the containing document */ |
|
378 /* End of common part */ |
|
379 xmlNs *ns; /* pointer to the associated namespace */ |
|
380 xmlAttributeType atype; /* the attribute type if validating */ |
|
381 void *psvi; /* for type/PSVI informations */ |
|
382 }; |
|
383 |
|
384 /** |
|
385 * xmlID: |
|
386 * |
|
387 * An XML ID instance. |
|
388 */ |
|
389 |
|
390 typedef struct _xmlID xmlID; |
|
391 typedef xmlID* xmlIDPtr; |
|
392 struct _xmlID { |
|
393 xmlIDPtr next; /* next ID */ |
|
394 const xmlChar* value; /* The ID name */ |
|
395 xmlAttrPtr attr; /* The attribute holding it */ |
|
396 const xmlChar* name; /* The attribute if attr is not available */ |
|
397 struct _xmlDoc* doc; /* The document holding the ID */ |
|
398 #ifdef LIBXML_ENABLE_NODE_LINEINFO |
|
399 int lineno; /* The line number if attr is not available */ |
|
400 #endif |
|
401 }; |
|
402 |
|
403 /** |
|
404 * xmlRef: |
|
405 * |
|
406 * An XML IDREF instance. |
|
407 */ |
|
408 |
|
409 typedef struct _xmlRef xmlRef; |
|
410 typedef xmlRef* xmlRefPtr; |
|
411 struct _xmlRef { |
|
412 xmlRefPtr next; /* next Ref */ |
|
413 const xmlChar* value; /* The Ref name */ |
|
414 xmlAttrPtr attr; /* The attribute holding it */ |
|
415 const xmlChar* name; /* The attribute if attr is not available */ |
|
416 #ifdef LIBXML_ENABLE_NODE_LINEINFO |
|
417 int lineno; /* The line number if attr is not available */ |
|
418 #endif |
|
419 }; |
|
420 |
|
421 /** |
|
422 * xmlBufferAllocationScheme: |
|
423 * |
|
424 * A buffer allocation scheme can be defined to either match exactly the |
|
425 * need or double it's allocated size each time it is found too small. |
|
426 */ |
|
427 |
|
428 typedef enum { |
|
429 XML_BUFFER_ALLOC_DOUBLEIT, |
|
430 XML_BUFFER_ALLOC_EXACT, |
|
431 XML_BUFFER_ALLOC_IMMUTABLE |
|
432 } xmlBufferAllocationScheme; |
|
433 |
|
434 /** |
|
435 * xmlBuffer: |
|
436 * |
|
437 * A buffer structure. |
|
438 */ |
|
439 typedef struct _xmlBuffer xmlBuffer; |
|
440 typedef xmlBuffer* xmlBufferPtr; |
|
441 struct _xmlBuffer { |
|
442 xmlChar* content; /* The buffer content UTF8 */ |
|
443 unsigned int use; /* The buffer size used */ |
|
444 unsigned int size; /* The buffer size */ |
|
445 xmlBufferAllocationScheme alloc; /* The realloc method */ |
|
446 }; |
|
447 |
|
448 /** |
|
449 * xmlNode: |
|
450 * |
|
451 * A node in an XML tree. |
|
452 * |
|
453 * Note: |
|
454 * Text nodes are also used to store binary data in the tree. |
|
455 * 'content' field is used to store a pointer to binary data |
|
456 * 'properties' field is used to store int length of the data |
|
457 * |
|
458 */ |
|
459 typedef struct _xmlNode xmlNode; |
|
460 typedef xmlNode* xmlNodePtr; |
|
461 struct _xmlNode { |
|
462 void* _private; /* application data */ |
|
463 xmlElementType type; /* type number, must be second ! */ |
|
464 const xmlChar* name; /* the name of the node, or the entity */ |
|
465 xmlNodePtr children; /* parent->childs link */ |
|
466 xmlNodePtr last; /* last child link */ |
|
467 xmlNodePtr parent; /* child->parent link */ |
|
468 xmlNodePtr next; /* next sibling link */ |
|
469 xmlNodePtr prev; /* previous sibling link */ |
|
470 struct _xmlDoc* doc; /* the containing document */ |
|
471 /* End of common part */ |
|
472 xmlNs *ns; /* pointer to the associated namespace */ |
|
473 xmlChar *content; /* the content */ |
|
474 struct _xmlAttr *properties;/* properties list */ |
|
475 xmlNs *nsDef; /* namespace definitions on this node */ |
|
476 void *psvi; /* for type/PSVI informations */ |
|
477 unsigned short extra; /* extra data for XPath/XSLT */ |
|
478 #ifdef LIBXML_ENABLE_NODE_LINEINFO |
|
479 unsigned short line; /* line number */ |
|
480 #endif |
|
481 }; |
|
482 |
|
483 /** |
|
484 * XML_GET_CONTENT: |
|
485 * |
|
486 * Macro to extract the content pointer of a node. |
|
487 */ |
|
488 #define XML_GET_CONTENT(n) \ |
|
489 ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content) |
|
490 |
|
491 |
|
492 |
|
493 #ifdef LIBXML_ENABLE_NODE_LINEINFO |
|
494 /** |
|
495 * XML_GET_LINE: |
|
496 * |
|
497 * Macro to extract the line number of an element node. |
|
498 */ |
|
499 #define XML_GET_LINE(n) (xmlGetLineNo(n)) |
|
500 #endif /* LIBXML_ENABLE_NODE_LINEINFO */ |
|
501 |
|
502 /** |
|
503 * xmlDoc: |
|
504 * |
|
505 * An XML document. |
|
506 */ |
|
507 typedef struct _xmlDoc xmlDoc; |
|
508 typedef xmlDoc* xmlDocPtr; |
|
509 struct _xmlDoc { |
|
510 void *_private; /* application data */ |
|
511 xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ |
|
512 char *name; /* name/filename/URI of the document */ |
|
513 struct _xmlNode *children; /* the document tree */ |
|
514 struct _xmlNode *last; /* last child link */ |
|
515 struct _xmlNode *parent; /* child->parent link */ |
|
516 struct _xmlNode *next; /* next sibling link */ |
|
517 struct _xmlNode *prev; /* previous sibling link */ |
|
518 struct _xmlDoc *doc; /* autoreference to itself */ |
|
519 /* End of common part */ |
|
520 |
|
521 /* dummy fields to avoid incorrect use of xmlDoc as xmlNode |
|
522 currently, always NULL; reserved. |
|
523 |
|
524 Added to prevent potential problems of same kind in the future. |
|
525 */ |
|
526 void* _reserved1; /* ~ xmlNode.ns */ |
|
527 void* _reserved2; /* ~ xmlNode.content */ |
|
528 void* _reserved3; /* ~ xmlNode.properties */ |
|
529 void* _reserved4; /* ~ xmlNode.nsDef */ |
|
530 /* End of 2nd (extra) common part (same as xmlNode) */ |
|
531 |
|
532 #ifdef LIBXML_ENABLE_GS_CACHING_IN_DOC |
|
533 void* cachedGs; /* cached value returned by xmlGetGlobalState() */ |
|
534 #endif |
|
535 int compression;/* level of zlib compression */ |
|
536 int standalone; /* standalone document (no external refs) */ |
|
537 struct _xmlDtd *intSubset; /* the document internal subset */ |
|
538 struct _xmlDtd *extSubset; /* the document external subset */ |
|
539 struct _xmlNs *oldNs; /* Global namespace, the old way */ |
|
540 const xmlChar *version; /* the XML version string */ |
|
541 const xmlChar *encoding; /* external initial encoding, if any */ |
|
542 void *ids; /* Hash table for ID attributes if any */ |
|
543 void *refs; /* Hash table for IDREFs attributes if any */ |
|
544 const xmlChar *URL; /* The URI for that document */ |
|
545 int charset; /* encoding of the in-memory content |
|
546 actually an xmlCharEncoding */ |
|
547 struct _xmlDict *dict; /* dict used to allocate names or NULL */ |
|
548 void *psvi; /* for type/PSVI informations */ |
|
549 //XMLENGINE: NEW CODE |
|
550 /* |
|
551 A container for nodes that were created as nodes of this document but |
|
552 are not linked into the document yet |
|
553 NOTE: this field is used by DOM C++ API only (not in libxml2 functions) |
|
554 */ |
|
555 void* ownedNodes; |
|
556 /* |
|
557 * Container for nodes that store external data references |
|
558 */ |
|
559 xmlNodePtr* dataNodeList; /* array of data nodes */ |
|
560 int dataNodeMax; /* maximum number of data nodes in the array */ |
|
561 // |
|
562 }; |
|
563 |
|
564 /* |
|
565 * Variables. |
|
566 */ |
|
567 |
|
568 /* |
|
569 * Some helper functions |
|
570 */ |
|
571 XMLPUBFUN int XMLCALL xmlValidateNCName (const xmlChar* value, int space); |
|
572 XMLPUBFUN int XMLCALL xmlValidateQName (const xmlChar* value, int space); |
|
573 XMLPUBFUN int XMLCALL xmlValidateName (const xmlChar* value, int space); |
|
574 XMLPUBFUN int XMLCALL xmlValidateNMToken(const xmlChar* value, int space); |
|
575 |
|
576 XMLPUBFUN xmlChar* XMLCALL |
|
577 xmlBuildQName (const xmlChar *ncname, const xmlChar *prefix, |
|
578 xmlChar *memory, int len); |
|
579 XMLPUBFUN xmlChar* XMLCALL |
|
580 xmlSplitQName2 (const xmlChar *name, xmlChar **prefix); |
|
581 XMLPUBFUN const xmlChar* XMLCALL |
|
582 xmlSplitQName3 (const xmlChar *name, int *len); |
|
583 |
|
584 /* |
|
585 * Handling Buffers. |
|
586 */ |
|
587 |
|
588 XMLPUBFUN void XMLCALL |
|
589 xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme); |
|
590 |
|
591 #ifndef XMLENGINE_EXCLUDE_UNUSED |
|
592 XMLPUBFUN xmlBufferAllocationScheme XMLCALL |
|
593 xmlGetBufferAllocationScheme(void); |
|
594 #endif /* ifndef XMLENGINE_EXCLUDE_UNUSED */ |
|
595 |
|
596 XMLPUBFUN xmlBufferPtr XMLCALL |
|
597 xmlBufferCreate (void); |
|
598 XMLPUBFUN xmlBufferPtr XMLCALL |
|
599 xmlBufferCreateSize (size_t size); |
|
600 XMLPUBFUN xmlBufferPtr XMLCALL |
|
601 xmlBufferCreateStatic (void *mem, size_t size); |
|
602 XMLPUBFUN int XMLCALL |
|
603 xmlBufferResize (xmlBufferPtr buf, unsigned int size); |
|
604 XMLPUBFUN void XMLCALL |
|
605 xmlBufferFree (xmlBufferPtr buf); |
|
606 |
|
607 #ifndef XMLENGINE_EXCLUDE_FILE_FUNC |
|
608 XMLPUBFUN int XMLCALL |
|
609 xmlBufferDump (FILE *file, xmlBufferPtr buf); |
|
610 #endif |
|
611 |
|
612 XMLPUBFUN void XMLCALL |
|
613 xmlBufferAdd (xmlBufferPtr buf, const xmlChar *str, int len); |
|
614 XMLPUBFUN void XMLCALL |
|
615 xmlBufferAddHead (xmlBufferPtr buf, const xmlChar *str, int len); |
|
616 XMLPUBFUN void XMLCALL |
|
617 xmlBufferCat (xmlBufferPtr buf, const xmlChar *str); |
|
618 XMLPUBFUN void XMLCALL |
|
619 xmlBufferCCat (xmlBufferPtr buf, const char *str); |
|
620 XMLPUBFUN int XMLCALL |
|
621 xmlBufferShrink (xmlBufferPtr buf, unsigned int len); |
|
622 XMLPUBFUN int XMLCALL |
|
623 xmlBufferGrow (xmlBufferPtr buf, unsigned int len); |
|
624 |
|
625 #ifndef XMLENGINE_EXCLUDE_UNUSED |
|
626 XMLPUBFUN void XMLCALL xmlBufferEmpty (xmlBufferPtr buf); |
|
627 XMLPUBFUN void XMLCALL xmlBufferSetAllocationScheme(xmlBufferPtr buf, xmlBufferAllocationScheme scheme); |
|
628 #endif |
|
629 |
|
630 XMLPUBFUN int XMLCALL xmlBufferLength (const xmlBufferPtr buf); |
|
631 |
|
632 // XMLENGINE: BEGIN NEW CODE |
|
633 /** |
|
634 * xmlBufferContent: |
|
635 * @param buf the buffer |
|
636 * |
|
637 * Function to extract the content of a buffer |
|
638 * |
|
639 * Returns the internal content |
|
640 */ |
|
641 #define xmlBufferContent(buf) ((buf)? (buf)->content : NULL) |
|
642 // XMLENGINE: END NEW CODE |
|
643 |
|
644 // DONE: OPTIMIZE: replaced by MACRO |
|
645 // XMLPUBFUN const xmlChar* XMLCALL |
|
646 // xmlBufferContent (const xmlBufferPtr buf); |
|
647 |
|
648 /* |
|
649 * Creating/freeing new structures. |
|
650 */ |
|
651 |
|
652 XMLPUBFUN xmlDtdPtr XMLCALL |
|
653 xmlCreateIntSubset (xmlDocPtr doc, |
|
654 const xmlChar *name, |
|
655 const xmlChar *ExternalID, |
|
656 const xmlChar *SystemID); |
|
657 XMLPUBFUN xmlDtdPtr XMLCALL |
|
658 xmlNewDtd (xmlDocPtr doc, |
|
659 const xmlChar *name, |
|
660 const xmlChar *ExternalID, |
|
661 const xmlChar *SystemID); |
|
662 XMLPUBFUN xmlDtdPtr XMLCALL |
|
663 xmlGetIntSubset (xmlDocPtr doc); |
|
664 XMLPUBFUN void XMLCALL |
|
665 xmlFreeDtd (xmlDtdPtr cur); |
|
666 XMLPUBFUN xmlNsPtr XMLCALL |
|
667 xmlNewGlobalNs (xmlDocPtr doc, |
|
668 const xmlChar *href, |
|
669 const xmlChar *prefix); |
|
670 XMLPUBFUN xmlNsPtr XMLCALL |
|
671 xmlNewNs (xmlNodePtr node, |
|
672 const xmlChar *href, |
|
673 const xmlChar *prefix); |
|
674 XMLPUBFUN void XMLCALL |
|
675 xmlFreeNs (xmlNsPtr cur); |
|
676 XMLPUBFUN void XMLCALL |
|
677 xmlFreeNsList (xmlNsPtr cur); |
|
678 XMLPUBFUN xmlDocPtr XMLCALL |
|
679 xmlNewDoc (const xmlChar *version); |
|
680 XMLPUBFUN void XMLCALL |
|
681 xmlFreeDoc (xmlDocPtr cur); |
|
682 XMLPUBFUN xmlAttrPtr XMLCALL |
|
683 xmlNewDocProp (xmlDocPtr doc, |
|
684 const xmlChar *name, |
|
685 const xmlChar *value); |
|
686 XMLPUBFUN xmlAttrPtr XMLCALL |
|
687 xmlNewProp (xmlNodePtr node, |
|
688 const xmlChar *name, |
|
689 const xmlChar *value); |
|
690 XMLPUBFUN xmlAttrPtr XMLCALL |
|
691 xmlNewNsProp (xmlNodePtr node, |
|
692 xmlNsPtr ns, |
|
693 const xmlChar *name, |
|
694 const xmlChar *value); |
|
695 XMLPUBFUN xmlAttrPtr XMLCALL |
|
696 xmlNewNsPropEatName (xmlNodePtr node, |
|
697 xmlNsPtr ns, |
|
698 xmlChar *name, |
|
699 const xmlChar *value); |
|
700 XMLPUBFUN void XMLCALL |
|
701 xmlFreePropList (xmlAttrPtr cur); |
|
702 XMLPUBFUN void XMLCALL |
|
703 xmlFreeProp (xmlAttrPtr cur); |
|
704 XMLPUBFUN xmlAttrPtr XMLCALL |
|
705 xmlCopyProp (xmlNodePtr target, |
|
706 xmlAttrPtr cur); |
|
707 XMLPUBFUN xmlAttrPtr XMLCALL |
|
708 xmlCopyPropList (xmlNodePtr target, |
|
709 xmlAttrPtr cur); |
|
710 #ifdef LIBXML_TREE_ENABLED |
|
711 XMLPUBFUN xmlDtdPtr XMLCALL |
|
712 xmlCopyDtd (xmlDtdPtr dtd); |
|
713 XMLPUBFUN xmlDocPtr XMLCALL |
|
714 xmlCopyDoc (xmlDocPtr doc, |
|
715 int recursive); |
|
716 #endif /* LIBXML_TREE_ENABLED */ |
|
717 |
|
718 /* |
|
719 * Creating new nodes. |
|
720 */ |
|
721 XMLPUBFUN xmlNodePtr XMLCALL |
|
722 xmlNewDocNode (xmlDocPtr doc, |
|
723 xmlNsPtr ns, |
|
724 const xmlChar *name, |
|
725 const xmlChar *content); |
|
726 XMLPUBFUN xmlNodePtr XMLCALL |
|
727 xmlNewDocNodeEatName (xmlDocPtr doc, |
|
728 xmlNsPtr ns, |
|
729 xmlChar *name, |
|
730 const xmlChar *content); |
|
731 XMLPUBFUN xmlNodePtr XMLCALL |
|
732 xmlNewDocRawNode (xmlDocPtr doc, |
|
733 xmlNsPtr ns, |
|
734 const xmlChar *name, |
|
735 const xmlChar *content); |
|
736 XMLPUBFUN xmlNodePtr XMLCALL |
|
737 xmlNewNode (xmlNsPtr ns, |
|
738 const xmlChar *name); |
|
739 XMLPUBFUN xmlNodePtr XMLCALL |
|
740 xmlNewNodeEatName (xmlNsPtr ns, |
|
741 xmlChar *name); |
|
742 XMLPUBFUN xmlNodePtr XMLCALL |
|
743 xmlNewChild (xmlNodePtr parent, |
|
744 xmlNsPtr ns, |
|
745 const xmlChar *name, |
|
746 const xmlChar *content); |
|
747 XMLPUBFUN xmlNodePtr XMLCALL |
|
748 xmlNewTextChild (xmlNodePtr parent, |
|
749 xmlNsPtr ns, |
|
750 const xmlChar *name, |
|
751 const xmlChar *content); |
|
752 XMLPUBFUN xmlNodePtr XMLCALL |
|
753 xmlNewDocText (xmlDocPtr doc, |
|
754 const xmlChar *content); |
|
755 XMLPUBFUN xmlNodePtr XMLCALL |
|
756 xmlNewText (const xmlChar *content); |
|
757 |
|
758 XMLPUBFUN xmlNodePtr XMLCALL |
|
759 xmlNewPI (const xmlChar *name, |
|
760 const xmlChar *content); |
|
761 XMLPUBFUN xmlNodePtr XMLCALL |
|
762 xmlNewDocTextLen (xmlDocPtr doc, |
|
763 const xmlChar *content, |
|
764 int len); |
|
765 XMLPUBFUN xmlNodePtr XMLCALL |
|
766 xmlNewTextLen (const xmlChar *content, |
|
767 int len); |
|
768 XMLPUBFUN xmlNodePtr XMLCALL |
|
769 xmlNewDocComment (xmlDocPtr doc, |
|
770 const xmlChar *content); |
|
771 XMLPUBFUN xmlNodePtr XMLCALL |
|
772 xmlNewComment (const xmlChar *content); |
|
773 XMLPUBFUN xmlNodePtr XMLCALL |
|
774 xmlNewCDataBlock (xmlDocPtr doc, |
|
775 const xmlChar *content, |
|
776 int len); |
|
777 XMLPUBFUN xmlNodePtr XMLCALL |
|
778 xmlNewCharRef (xmlDocPtr doc, |
|
779 const xmlChar *name); |
|
780 XMLPUBFUN xmlNodePtr XMLCALL |
|
781 xmlNewReference (xmlDocPtr doc, |
|
782 const xmlChar *name); |
|
783 XMLPUBFUN xmlNodePtr XMLCALL |
|
784 xmlCopyNode (const xmlNodePtr node, |
|
785 int recursive); |
|
786 XMLPUBFUN xmlNodePtr XMLCALL |
|
787 xmlDocCopyNode (const xmlNodePtr node, |
|
788 xmlDocPtr doc, |
|
789 int recursive); |
|
790 |
|
791 |
|
792 XMLPUBFUN xmlNodePtr XMLCALL xmlCopyNodeList (const xmlNodePtr node); |
|
793 |
|
794 #ifdef LIBXML_TREE_ENABLED |
|
795 XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocFragment (xmlDocPtr doc); |
|
796 #endif /* LIBXML_TREE_ENABLED */ |
|
797 |
|
798 /* |
|
799 * Navigating. |
|
800 */ |
|
801 #ifdef LIBXML_ENABLE_NODE_LINEINFO |
|
802 XMLPUBFUN long XMLCALL xmlGetLineNo(xmlNodePtr node); |
|
803 #endif |
|
804 |
|
805 #ifdef LIBXML_TREE_ENABLED |
|
806 # ifndef XMLENGINE_EXCLUDE_UNUSED |
|
807 XMLPUBFUN xmlChar * XMLCALL xmlGetNodePath (xmlNodePtr node); |
|
808 # endif /* ifndef XMLENGINE_EXCLUDE_UNUSED */ |
|
809 #endif /* LIBXML_TREE_ENABLED */ |
|
810 |
|
811 XMLPUBFUN xmlNodePtr XMLCALL xmlDocGetRootElement (xmlDocPtr doc); |
|
812 XMLPUBFUN xmlNodePtr XMLCALL xmlGetLastChild (xmlNodePtr parent); |
|
813 XMLPUBFUN int XMLCALL xmlNodeIsText (xmlNodePtr node); |
|
814 XMLPUBFUN int XMLCALL xmlIsBlankNode (xmlNodePtr node); |
|
815 |
|
816 #ifdef LIBXML_TREE_ENABLED |
|
817 /* |
|
818 * Changing the structure. |
|
819 */ |
|
820 XMLPUBFUN xmlNodePtr XMLCALL |
|
821 xmlDocSetRootElement (xmlDocPtr doc, xmlNodePtr root); |
|
822 XMLPUBFUN void XMLCALL |
|
823 xmlNodeSetName (xmlNodePtr cur, const xmlChar *name); |
|
824 XMLPUBFUN xmlNodePtr XMLCALL |
|
825 xmlReplaceNode (xmlNodePtr old, xmlNodePtr cur); |
|
826 XMLPUBFUN xmlNodePtr XMLCALL |
|
827 xmlAddPrevSibling (xmlNodePtr cur, xmlNodePtr elem); |
|
828 #endif /* LIBXML_TREE_ENABLED */ |
|
829 |
|
830 XMLPUBFUN xmlNodePtr XMLCALL |
|
831 xmlAddChild (xmlNodePtr parent, xmlNodePtr cur); |
|
832 XMLPUBFUN xmlNodePtr XMLCALL |
|
833 xmlAddChildList (xmlNodePtr parent, xmlNodePtr cur); |
|
834 |
|
835 XMLPUBFUN xmlNodePtr XMLCALL |
|
836 xmlAddSibling (xmlNodePtr cur, xmlNodePtr elem); |
|
837 XMLPUBFUN xmlNodePtr XMLCALL |
|
838 xmlAddNextSibling (xmlNodePtr cur, xmlNodePtr elem); |
|
839 XMLPUBFUN void XMLCALL |
|
840 xmlUnlinkNode (xmlNodePtr cur); |
|
841 XMLPUBFUN xmlNodePtr XMLCALL |
|
842 xmlTextMerge (xmlNodePtr first, xmlNodePtr second); |
|
843 XMLPUBFUN int XMLCALL |
|
844 xmlTextConcat (xmlNodePtr node, const xmlChar *content, int len); |
|
845 |
|
846 XMLPUBFUN void XMLCALL xmlFreeNodeList (xmlNodePtr cur); |
|
847 XMLPUBFUN void XMLCALL xmlFreeNode (xmlNodePtr cur); |
|
848 XMLPUBFUN void XMLCALL xmlSetTreeDoc (xmlNodePtr tree, xmlDocPtr doc); |
|
849 XMLPUBFUN void XMLCALL xmlSetListDoc (xmlNodePtr list, xmlDocPtr doc); |
|
850 /* |
|
851 * Namespaces. |
|
852 */ |
|
853 XMLPUBFUN xmlNsPtr XMLCALL |
|
854 xmlSearchNs (xmlDocPtr doc, |
|
855 xmlNodePtr node, |
|
856 const xmlChar *nameSpace); |
|
857 XMLPUBFUN xmlNsPtr XMLCALL |
|
858 xmlSearchNsByHref (xmlDocPtr doc, |
|
859 xmlNodePtr node, |
|
860 const xmlChar *href); |
|
861 |
|
862 XMLPUBFUN void XMLCALL xmlSetNs (xmlNodePtr node, xmlNsPtr ns); |
|
863 XMLPUBFUN xmlNsPtr XMLCALL xmlCopyNamespace (xmlNsPtr cur); |
|
864 XMLPUBFUN xmlNsPtr XMLCALL xmlCopyNamespaceList (xmlNsPtr cur); |
|
865 |
|
866 #ifdef LIBXML_TREE_ENABLED |
|
867 XMLPUBFUN xmlNsPtr* XMLCALL xmlGetNsList (xmlDocPtr doc, xmlNodePtr node); |
|
868 #endif /* LIBXML_TREE_ENABLED */ |
|
869 |
|
870 |
|
871 /* |
|
872 * Changing the content. |
|
873 */ |
|
874 #ifdef LIBXML_TREE_ENABLED |
|
875 XMLPUBFUN xmlAttrPtr XMLCALL |
|
876 xmlSetProp (xmlNodePtr node, |
|
877 const xmlChar *name, |
|
878 const xmlChar *value); |
|
879 #endif /* LIBXML_TREE_ENABLED */ |
|
880 XMLPUBFUN xmlChar * XMLCALL |
|
881 xmlGetNoNsProp (xmlNodePtr node, |
|
882 const xmlChar *name); |
|
883 XMLPUBFUN xmlChar * XMLCALL |
|
884 xmlGetProp (xmlNodePtr node, |
|
885 const xmlChar *name); |
|
886 XMLPUBFUN xmlAttrPtr XMLCALL |
|
887 xmlHasProp (xmlNodePtr node, |
|
888 const xmlChar *name); |
|
889 XMLPUBFUN xmlAttrPtr XMLCALL |
|
890 xmlHasNsProp (xmlNodePtr node, |
|
891 const xmlChar *name, |
|
892 const xmlChar *nameSpace); |
|
893 #ifdef LIBXML_TREE_ENABLED |
|
894 XMLPUBFUN xmlAttrPtr XMLCALL |
|
895 xmlSetNsProp (xmlNodePtr node, |
|
896 xmlNsPtr ns, |
|
897 const xmlChar *name, |
|
898 const xmlChar *value); |
|
899 #endif /* LIBXML_TREE_ENABLED */ |
|
900 XMLPUBFUN xmlChar * XMLCALL |
|
901 xmlGetNsProp (xmlNodePtr node, |
|
902 const xmlChar *name, |
|
903 const xmlChar *nameSpace); |
|
904 XMLPUBFUN xmlNodePtr XMLCALL |
|
905 xmlStringGetNodeList (xmlDocPtr doc, |
|
906 const xmlChar *value); |
|
907 XMLPUBFUN xmlNodePtr XMLCALL |
|
908 xmlStringLenGetNodeList (xmlDocPtr doc, |
|
909 const xmlChar *value, |
|
910 int len); |
|
911 XMLPUBFUN xmlChar * XMLCALL |
|
912 xmlNodeListGetString (xmlDocPtr doc, |
|
913 xmlNodePtr list, |
|
914 int inLine); |
|
915 #ifdef LIBXML_TREE_ENABLED |
|
916 XMLPUBFUN xmlChar * XMLCALL |
|
917 xmlNodeListGetRawString (xmlDocPtr doc, |
|
918 xmlNodePtr list, |
|
919 int inLine); |
|
920 #endif /* LIBXML_TREE_ENABLED */ |
|
921 XMLPUBFUN void XMLCALL |
|
922 xmlNodeSetContent (xmlNodePtr cur, |
|
923 const xmlChar *content); |
|
924 #ifdef LIBXML_TREE_ENABLED |
|
925 XMLPUBFUN void XMLCALL |
|
926 xmlNodeSetContentLen (xmlNodePtr cur, |
|
927 const xmlChar *content, |
|
928 int len); |
|
929 #endif /* LIBXML_TREE_ENABLED */ |
|
930 XMLPUBFUN void XMLCALL |
|
931 xmlNodeAddContent (xmlNodePtr cur, |
|
932 const xmlChar *content); |
|
933 XMLPUBFUN void XMLCALL |
|
934 xmlNodeAddContentLen (xmlNodePtr cur, |
|
935 const xmlChar *content, |
|
936 int len); |
|
937 XMLPUBFUN xmlChar * XMLCALL |
|
938 xmlNodeGetContent (xmlNodePtr cur); |
|
939 XMLPUBFUN int XMLCALL |
|
940 xmlNodeBufGetContent (xmlBufferPtr buffer, |
|
941 xmlNodePtr cur); |
|
942 XMLPUBFUN xmlChar * XMLCALL |
|
943 xmlNodeGetLang (xmlNodePtr cur); |
|
944 XMLPUBFUN int XMLCALL |
|
945 xmlNodeGetSpacePreserve (xmlNodePtr cur); |
|
946 |
|
947 XMLPUBFUN xmlChar * XMLCALL |
|
948 xmlNodeGetBase (xmlDocPtr doc, |
|
949 xmlNodePtr cur); |
|
950 |
|
951 #ifdef LIBXML_TREE_ENABLED |
|
952 XMLPUBFUN void XMLCALL |
|
953 xmlNodeSetLang (xmlNodePtr cur, |
|
954 const xmlChar *lang); |
|
955 XMLPUBFUN void XMLCALL |
|
956 xmlNodeSetSpacePreserve (xmlNodePtr cur, |
|
957 int val); |
|
958 XMLPUBFUN void XMLCALL |
|
959 xmlNodeSetBase (xmlNodePtr cur, |
|
960 const xmlChar *uri); |
|
961 /* |
|
962 * Removing content. |
|
963 */ |
|
964 XMLPUBFUN int XMLCALL |
|
965 xmlRemoveProp (xmlAttrPtr cur); |
|
966 XMLPUBFUN int XMLCALL |
|
967 xmlUnsetProp (xmlNodePtr node, |
|
968 const xmlChar *name); |
|
969 XMLPUBFUN int XMLCALL |
|
970 xmlUnsetNsProp (xmlNodePtr node, |
|
971 xmlNsPtr ns, |
|
972 const xmlChar *name); |
|
973 #endif /* LIBXML_TREE_ENABLED */ |
|
974 |
|
975 /* |
|
976 * Internal, don't use. |
|
977 */ |
|
978 XMLPUBFUN void XMLCALL |
|
979 xmlBufferWriteCHAR (xmlBufferPtr buf, |
|
980 const xmlChar *string); |
|
981 XMLPUBFUN void XMLCALL |
|
982 xmlBufferWriteChar (xmlBufferPtr buf, |
|
983 const char *string); |
|
984 XMLPUBFUN void XMLCALL |
|
985 xmlBufferWriteQuotedString(xmlBufferPtr buf, |
|
986 const xmlChar *string); |
|
987 |
|
988 XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf, |
|
989 xmlDocPtr doc, |
|
990 xmlAttrPtr attr, |
|
991 const xmlChar *string); |
|
992 |
|
993 /* |
|
994 * Namespace handling. |
|
995 */ |
|
996 XMLPUBFUN int XMLCALL |
|
997 xmlReconciliateNs (xmlDocPtr doc, |
|
998 xmlNodePtr tree); |
|
999 |
|
1000 #ifdef LIBXML_OUTPUT_ENABLED |
|
1001 /* |
|
1002 * Saving. |
|
1003 */ |
|
1004 XMLPUBFUN void XMLCALL |
|
1005 xmlDocDumpFormatMemory (xmlDocPtr cur, |
|
1006 xmlChar **mem, |
|
1007 int *size, |
|
1008 int format); |
|
1009 XMLPUBFUN void XMLCALL |
|
1010 xmlDocDumpMemory (xmlDocPtr cur, |
|
1011 xmlChar **mem, |
|
1012 int *size); |
|
1013 XMLPUBFUN void XMLCALL |
|
1014 xmlDocDumpMemoryEnc (xmlDocPtr out_doc, |
|
1015 xmlChar **doc_txt_ptr, |
|
1016 int * doc_txt_len, |
|
1017 const char *txt_encoding); |
|
1018 XMLPUBFUN void XMLCALL |
|
1019 xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, |
|
1020 xmlChar **doc_txt_ptr, |
|
1021 int * doc_txt_len, |
|
1022 const char *txt_encoding, |
|
1023 int format); |
|
1024 |
|
1025 #ifndef XMLENGINE_EXCLUDE_FILE_FUNC |
|
1026 XMLPUBFUN int XMLCALL |
|
1027 xmlDocFormatDump (FILE *f, |
|
1028 xmlDocPtr cur, |
|
1029 int format); |
|
1030 |
|
1031 XMLPUBFUN int XMLCALL |
|
1032 xmlDocDump (FILE *f, |
|
1033 xmlDocPtr cur); |
|
1034 XMLPUBFUN void XMLCALL |
|
1035 xmlElemDump (FILE *f, |
|
1036 xmlDocPtr doc, |
|
1037 xmlNodePtr cur); |
|
1038 #endif /* XMLENGINE_EXCLUDE_FILE_FUNC */ |
|
1039 |
|
1040 XMLPUBFUN int XMLCALL |
|
1041 xmlSaveFile (const char *filename, |
|
1042 xmlDocPtr cur); |
|
1043 XMLPUBFUN int XMLCALL |
|
1044 xmlSaveFormatFile (const char *filename, |
|
1045 xmlDocPtr cur, |
|
1046 int format); |
|
1047 XMLPUBFUN int XMLCALL |
|
1048 xmlNodeDump (xmlBufferPtr buf, |
|
1049 xmlDocPtr doc, |
|
1050 xmlNodePtr cur, |
|
1051 int level, |
|
1052 int format); |
|
1053 |
|
1054 XMLPUBFUN int XMLCALL |
|
1055 xmlSaveFileTo (xmlOutputBufferPtr buf, |
|
1056 xmlDocPtr cur, |
|
1057 const char *encoding); |
|
1058 XMLPUBFUN int XMLCALL |
|
1059 xmlSaveFormatFileTo (xmlOutputBufferPtr buf, |
|
1060 xmlDocPtr cur, |
|
1061 const char *encoding, |
|
1062 int format); |
|
1063 |
|
1064 XMLPUBFUN void XMLCALL |
|
1065 xmlNodeDumpOutput (xmlOutputBufferPtr buf, |
|
1066 xmlDocPtr doc, |
|
1067 xmlNodePtr cur, |
|
1068 int level, |
|
1069 int format, |
|
1070 const char *encoding); |
|
1071 |
|
1072 XMLPUBFUN int XMLCALL |
|
1073 xmlSaveFormatFileEnc (const char *filename, |
|
1074 xmlDocPtr cur, |
|
1075 const char *encoding, |
|
1076 int format); |
|
1077 |
|
1078 XMLPUBFUN int XMLCALL |
|
1079 xmlSaveFileEnc (const char *filename, |
|
1080 xmlDocPtr cur, |
|
1081 const char *encoding); |
|
1082 |
|
1083 #endif /* LIBXML_OUTPUT_ENABLED */ |
|
1084 /* |
|
1085 * XHTML |
|
1086 */ |
|
1087 XMLPUBFUN int XMLCALL xmlIsXHTML(const xmlChar *systemID, const xmlChar *publicID); |
|
1088 |
|
1089 /* |
|
1090 * Compression. |
|
1091 */ |
|
1092 XMLPUBFUN void XMLCALL xmlSetDocCompressMode(xmlDocPtr doc, int mode); |
|
1093 |
|
1094 #ifndef XMLENGINE_EXCLUDE_UNUSED |
|
1095 XMLPUBFUN int XMLCALL xmlGetDocCompressMode(xmlDocPtr doc); |
|
1096 XMLPUBFUN int XMLCALL xmlGetCompressMode(void); |
|
1097 XMLPUBFUN void XMLCALL xmlSetCompressMode(int mode); |
|
1098 #endif /* ifndef XMLENGINE_EXCLUDE_UNUSED */ |
|
1099 |
|
1100 #ifdef __cplusplus |
|
1101 } |
|
1102 #endif |
|
1103 |
|
1104 #endif /* XML_TREE_H */ |
|
1105 |
|
1106 |