2 # Functions from module HTMLparser
5 def htmlCreateMemoryParserCtxt(buffer, size):
6 """Create a parser context for an HTML in-memory document. """
7 ret = libxml2mod.htmlCreateMemoryParserCtxt(buffer, size)
8 if ret is None:raise parserError('htmlCreateMemoryParserCtxt() failed')
9 return parserCtxt(_obj=ret)
11 def htmlHandleOmittedElem(val):
12 """Set and return the previous value for handling HTML omitted
14 ret = libxml2mod.htmlHandleOmittedElem(val)
17 def htmlIsScriptAttribute(name):
18 """Check if an attribute is of content type Script """
19 ret = libxml2mod.htmlIsScriptAttribute(name)
22 def htmlNewParserCtxt():
23 """Allocate and initialize a new parser context. """
24 ret = libxml2mod.htmlNewParserCtxt()
25 if ret is None:raise parserError('htmlNewParserCtxt() failed')
26 return parserCtxt(_obj=ret)
28 def htmlParseDoc(cur, encoding):
29 """parse an HTML in-memory document and build a tree. """
30 ret = libxml2mod.htmlParseDoc(cur, encoding)
31 if ret is None:raise parserError('htmlParseDoc() failed')
32 return xmlDoc(_obj=ret)
34 def htmlParseFile(filename, encoding):
35 """parse an HTML file and build a tree. Automatic support for
36 ZLIB/Compress compressed document is provided by default if
37 found at compile-time. """
38 ret = libxml2mod.htmlParseFile(filename, encoding)
39 if ret is None:raise parserError('htmlParseFile() failed')
40 return xmlDoc(_obj=ret)
42 def htmlReadDoc(cur, URL, encoding, options):
43 """parse an XML in-memory document and build a tree. """
44 ret = libxml2mod.htmlReadDoc(cur, URL, encoding, options)
45 if ret is None:raise treeError('htmlReadDoc() failed')
46 return xmlDoc(_obj=ret)
48 def htmlReadFd(fd, URL, encoding, options):
49 """parse an XML from a file descriptor and build a tree. """
50 ret = libxml2mod.htmlReadFd(fd, URL, encoding, options)
51 if ret is None:raise treeError('htmlReadFd() failed')
52 return xmlDoc(_obj=ret)
54 def htmlReadFile(filename, encoding, options):
55 """parse an XML file from the filesystem or the network. """
56 ret = libxml2mod.htmlReadFile(filename, encoding, options)
57 if ret is None:raise treeError('htmlReadFile() failed')
58 return xmlDoc(_obj=ret)
60 def htmlReadMemory(buffer, size, URL, encoding, options):
61 """parse an XML in-memory document and build a tree. """
62 ret = libxml2mod.htmlReadMemory(buffer, size, URL, encoding, options)
63 if ret is None:raise treeError('htmlReadMemory() failed')
64 return xmlDoc(_obj=ret)
67 # Functions from module HTMLtree
70 def htmlIsBooleanAttr(name):
71 """Determine if a given attribute is a boolean attribute. """
72 ret = libxml2mod.htmlIsBooleanAttr(name)
75 def htmlNewDoc(URI, ExternalID):
76 """Creates a new HTML document """
77 ret = libxml2mod.htmlNewDoc(URI, ExternalID)
78 if ret is None:raise treeError('htmlNewDoc() failed')
79 return xmlDoc(_obj=ret)
81 def htmlNewDocNoDtD(URI, ExternalID):
82 """Creates a new HTML document without a DTD node if @URI and
83 @ExternalID are None """
84 ret = libxml2mod.htmlNewDocNoDtD(URI, ExternalID)
85 if ret is None:raise treeError('htmlNewDocNoDtD() failed')
86 return xmlDoc(_obj=ret)
89 # Functions from module SAX2
92 def SAXDefaultVersion(version):
93 """Set the default version of SAX used globally by the
94 library. By default, during initialization the default is
95 set to 2. Note that it is generally a better coding style
96 to use xmlSAXVersion() to set up the version explicitly for
97 a given parsing context. """
98 ret = libxml2mod.xmlSAXDefaultVersion(version)
101 def defaultSAXHandlerInit():
102 """Initialize the default SAX2 handler """
103 libxml2mod.xmlDefaultSAXHandlerInit()
105 def docbDefaultSAXHandlerInit():
106 """Initialize the default SAX handler """
107 libxml2mod.docbDefaultSAXHandlerInit()
109 def htmlDefaultSAXHandlerInit():
110 """Initialize the default SAX handler """
111 libxml2mod.htmlDefaultSAXHandlerInit()
114 # Functions from module catalog
117 def catalogAdd(type, orig, replace):
118 """Add an entry in the catalog, it may overwrite existing but
119 different entries. If called before any other catalog
120 routine, allows to override the default shared catalog put
121 in place by xmlInitializeCatalog(); """
122 ret = libxml2mod.xmlCatalogAdd(type, orig, replace)
125 def catalogCleanup():
126 """Free up all the memory associated with catalogs """
127 libxml2mod.xmlCatalogCleanup()
129 def catalogConvert():
130 """Convert all the SGML catalog entries as XML ones """
131 ret = libxml2mod.xmlCatalogConvert()
134 def catalogDump(out):
135 """Dump all the global catalog content to the given file. """
136 if out is not None: out.flush()
137 libxml2mod.xmlCatalogDump(out)
139 def catalogGetPublic(pubID):
140 """Try to lookup the catalog reference associated to a public
141 ID DEPRECATED, use xmlCatalogResolvePublic() """
142 ret = libxml2mod.xmlCatalogGetPublic(pubID)
145 def catalogGetSystem(sysID):
146 """Try to lookup the catalog reference associated to a system
147 ID DEPRECATED, use xmlCatalogResolveSystem() """
148 ret = libxml2mod.xmlCatalogGetSystem(sysID)
151 def catalogRemove(value):
152 """Remove an entry from the catalog """
153 ret = libxml2mod.xmlCatalogRemove(value)
156 def catalogResolve(pubID, sysID):
157 """Do a complete resolution lookup of an External Identifier """
158 ret = libxml2mod.xmlCatalogResolve(pubID, sysID)
161 def catalogResolvePublic(pubID):
162 """Try to lookup the catalog reference associated to a public
164 ret = libxml2mod.xmlCatalogResolvePublic(pubID)
167 def catalogResolveSystem(sysID):
168 """Try to lookup the catalog resource for a system ID """
169 ret = libxml2mod.xmlCatalogResolveSystem(sysID)
172 def catalogResolveURI(URI):
173 """Do a complete resolution lookup of an URI """
174 ret = libxml2mod.xmlCatalogResolveURI(URI)
177 def catalogSetDebug(level):
178 """Used to set the debug level for catalog operation, 0
179 disable debugging, 1 enable it """
180 ret = libxml2mod.xmlCatalogSetDebug(level)
183 def initializeCatalog():
184 """Do the catalog initialization. this function is not thread
185 safe, catalog initialization should preferably be done once
187 libxml2mod.xmlInitializeCatalog()
189 def loadACatalog(filename):
190 """Load the catalog and build the associated data structures.
191 This can be either an XML Catalog or an SGML Catalog It
192 will recurse in SGML CATALOG entries. On the other hand XML
193 Catalogs are not handled recursively. """
194 ret = libxml2mod.xmlLoadACatalog(filename)
195 if ret is None:raise treeError('xmlLoadACatalog() failed')
196 return catalog(_obj=ret)
198 def loadCatalog(filename):
199 """Load the catalog and makes its definitions effective for
200 the default external entity loader. It will recurse in SGML
201 CATALOG entries. this function is not thread safe, catalog
202 initialization should preferably be done once at startup """
203 ret = libxml2mod.xmlLoadCatalog(filename)
206 def loadCatalogs(pathss):
207 """Load the catalogs and makes their definitions effective for
208 the default external entity loader. this function is not
209 thread safe, catalog initialization should preferably be
210 done once at startup """
211 libxml2mod.xmlLoadCatalogs(pathss)
213 def loadSGMLSuperCatalog(filename):
214 """Load an SGML super catalog. It won't expand CATALOG or
215 DELEGATE references. This is only needed for manipulating
216 SGML Super Catalogs like adding and removing CATALOG or
217 DELEGATE entries. """
218 ret = libxml2mod.xmlLoadSGMLSuperCatalog(filename)
219 if ret is None:raise treeError('xmlLoadSGMLSuperCatalog() failed')
220 return catalog(_obj=ret)
222 def newCatalog(sgml):
223 """create a new Catalog. """
224 ret = libxml2mod.xmlNewCatalog(sgml)
225 if ret is None:raise treeError('xmlNewCatalog() failed')
226 return catalog(_obj=ret)
228 def parseCatalogFile(filename):
229 """parse an XML file and build a tree. It's like
230 xmlParseFile() except it bypass all catalog lookups. """
231 ret = libxml2mod.xmlParseCatalogFile(filename)
232 if ret is None:raise parserError('xmlParseCatalogFile() failed')
233 return xmlDoc(_obj=ret)
236 # Functions from module chvalid
240 """This function is DEPRECATED. Use xmlIsBaseChar_ch or
241 xmlIsBaseCharQ instead """
242 ret = libxml2mod.xmlIsBaseChar(ch)
246 """This function is DEPRECATED. Use xmlIsBlank_ch or
247 xmlIsBlankQ instead """
248 ret = libxml2mod.xmlIsBlank(ch)
252 """This function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ
254 ret = libxml2mod.xmlIsChar(ch)
258 """This function is DEPRECATED. Use xmlIsCombiningQ instead """
259 ret = libxml2mod.xmlIsCombining(ch)
263 """This function is DEPRECATED. Use xmlIsDigit_ch or
264 xmlIsDigitQ instead """
265 ret = libxml2mod.xmlIsDigit(ch)
269 """This function is DEPRECATED. Use xmlIsExtender_ch or
270 xmlIsExtenderQ instead """
271 ret = libxml2mod.xmlIsExtender(ch)
274 def isIdeographic(ch):
275 """This function is DEPRECATED. Use xmlIsIdeographicQ instead """
276 ret = libxml2mod.xmlIsIdeographic(ch)
280 """This function is DEPRECATED. Use xmlIsPubidChar_ch or
281 xmlIsPubidCharQ instead """
282 ret = libxml2mod.xmlIsPubidChar(ch)
286 # Functions from module debugXML
289 def boolToText(boolval):
290 """Convenient way to turn bool into text """
291 ret = libxml2mod.xmlBoolToText(boolval)
294 def debugDumpString(output, str):
295 """Dumps informations about the string, shorten it if necessary """
296 if output is not None: output.flush()
297 libxml2mod.xmlDebugDumpString(output, str)
299 def shellPrintXPathError(errorType, arg):
300 """Print the xpath error to libxml default error channel """
301 libxml2mod.xmlShellPrintXPathError(errorType, arg)
304 # Functions from module dict
308 """Free the dictionary mutex. Do not call unless sure the
309 library is not in use anymore ! """
310 libxml2mod.xmlDictCleanup()
312 def initializeDict():
313 """Do the dictionary mutex initialization. this function is
315 ret = libxml2mod.xmlInitializeDict()
319 # Functions from module encoding
322 def addEncodingAlias(name, alias):
323 """Registers an alias @alias for an encoding named @name.
324 Existing alias will be overwritten. """
325 ret = libxml2mod.xmlAddEncodingAlias(name, alias)
328 def cleanupCharEncodingHandlers():
329 """Cleanup the memory allocated for the char encoding support,
330 it unregisters all the encoding handlers and the aliases. """
331 libxml2mod.xmlCleanupCharEncodingHandlers()
333 def cleanupEncodingAliases():
334 """Unregisters all aliases """
335 libxml2mod.xmlCleanupEncodingAliases()
337 def delEncodingAlias(alias):
338 """Unregisters an encoding alias @alias """
339 ret = libxml2mod.xmlDelEncodingAlias(alias)
342 def encodingAlias(alias):
343 """Lookup an encoding name for the given alias. """
344 ret = libxml2mod.xmlGetEncodingAlias(alias)
347 def initCharEncodingHandlers():
348 """Initialize the char encoding support, it registers the
349 default encoding supported. NOTE: while public, this
350 function usually doesn't need to be called in normal
352 libxml2mod.xmlInitCharEncodingHandlers()
355 # Functions from module entities
358 def cleanupPredefinedEntities():
359 """Cleanup up the predefined entities table. Deprecated call """
360 libxml2mod.xmlCleanupPredefinedEntities()
362 def initializePredefinedEntities():
363 """Set up the predefined entities. Deprecated call """
364 libxml2mod.xmlInitializePredefinedEntities()
366 def predefinedEntity(name):
367 """Check whether this name is an predefined entity. """
368 ret = libxml2mod.xmlGetPredefinedEntity(name)
369 if ret is None:raise treeError('xmlGetPredefinedEntity() failed')
370 return xmlEntity(_obj=ret)
373 # Functions from module globals
376 def cleanupGlobals():
377 """Additional cleanup for multi-threading """
378 libxml2mod.xmlCleanupGlobals()
381 """Additional initialisation for multi-threading """
382 libxml2mod.xmlInitGlobals()
384 def thrDefDefaultBufferSize(v):
385 ret = libxml2mod.xmlThrDefDefaultBufferSize(v)
388 def thrDefDoValidityCheckingDefaultValue(v):
389 ret = libxml2mod.xmlThrDefDoValidityCheckingDefaultValue(v)
392 def thrDefGetWarningsDefaultValue(v):
393 ret = libxml2mod.xmlThrDefGetWarningsDefaultValue(v)
396 def thrDefIndentTreeOutput(v):
397 ret = libxml2mod.xmlThrDefIndentTreeOutput(v)
400 def thrDefKeepBlanksDefaultValue(v):
401 ret = libxml2mod.xmlThrDefKeepBlanksDefaultValue(v)
404 def thrDefLineNumbersDefaultValue(v):
405 ret = libxml2mod.xmlThrDefLineNumbersDefaultValue(v)
408 def thrDefLoadExtDtdDefaultValue(v):
409 ret = libxml2mod.xmlThrDefLoadExtDtdDefaultValue(v)
412 def thrDefParserDebugEntities(v):
413 ret = libxml2mod.xmlThrDefParserDebugEntities(v)
416 def thrDefPedanticParserDefaultValue(v):
417 ret = libxml2mod.xmlThrDefPedanticParserDefaultValue(v)
420 def thrDefSaveNoEmptyTags(v):
421 ret = libxml2mod.xmlThrDefSaveNoEmptyTags(v)
424 def thrDefSubstituteEntitiesDefaultValue(v):
425 ret = libxml2mod.xmlThrDefSubstituteEntitiesDefaultValue(v)
428 def thrDefTreeIndentString(v):
429 ret = libxml2mod.xmlThrDefTreeIndentString(v)
433 # Functions from module nanoftp
436 def nanoFTPCleanup():
437 """Cleanup the FTP protocol layer. This cleanup proxy
439 libxml2mod.xmlNanoFTPCleanup()
442 """Initialize the FTP protocol layer. Currently it just checks
443 for proxy informations, and get the hostname """
444 libxml2mod.xmlNanoFTPInit()
446 def nanoFTPProxy(host, port, user, passwd, type):
447 """Setup the FTP proxy informations. This can also be done by
448 using ftp_proxy ftp_proxy_user and ftp_proxy_password
449 environment variables. """
450 libxml2mod.xmlNanoFTPProxy(host, port, user, passwd, type)
452 def nanoFTPScanProxy(URL):
453 """(Re)Initialize the FTP Proxy context by parsing the URL and
454 finding the protocol host port it indicates. Should be like
455 ftp://myproxy/ or ftp://myproxy:3128/ A None URL cleans up
456 proxy informations. """
457 libxml2mod.xmlNanoFTPScanProxy(URL)
460 # Functions from module nanohttp
463 def nanoHTTPCleanup():
464 """Cleanup the HTTP protocol layer. """
465 libxml2mod.xmlNanoHTTPCleanup()
468 """Initialize the HTTP protocol layer. Currently it just
469 checks for proxy informations """
470 libxml2mod.xmlNanoHTTPInit()
472 def nanoHTTPScanProxy(URL):
473 """(Re)Initialize the HTTP Proxy context by parsing the URL
474 and finding the protocol host port it indicates. Should be
475 like http://myproxy/ or http://myproxy:3128/ A None URL
476 cleans up proxy informations. """
477 libxml2mod.xmlNanoHTTPScanProxy(URL)
480 # Functions from module parser
483 def createDocParserCtxt(cur):
484 """Creates a parser context for an XML in-memory document. """
485 ret = libxml2mod.xmlCreateDocParserCtxt(cur)
486 if ret is None:raise parserError('xmlCreateDocParserCtxt() failed')
487 return parserCtxt(_obj=ret)
490 """Initialization function for the XML parser. This is not
491 reentrant. Call once before processing in case of use in
492 multithreaded programs. """
493 libxml2mod.xmlInitParser()
495 def keepBlanksDefault(val):
496 """Set and return the previous value for default blanks text
497 nodes support. The 1.x version of the parser used an
498 heuristic to try to detect ignorable white spaces. As a
499 result the SAX callback was generating
500 xmlSAX2IgnorableWhitespace() callbacks instead of
501 characters() one, and when using the DOM output text nodes
502 containing those blanks were not generated. The 2.x and
503 later version will switch to the XML standard way and
504 ignorableWhitespace() are only generated when running the
505 parser in validating mode and when the current element
506 doesn't allow CDATA or mixed content. This function is
507 provided as a way to force the standard behavior on 1.X
508 libs and to switch back to the old mode for compatibility
509 when running 1.X client code on 2.X . Upgrade of 1.X code
510 should be done by using xmlIsBlankNode() commodity function
511 to detect the "empty" nodes generated. This value also
512 affect autogeneration of indentation when saving code if
513 blanks sections are kept, indentation is not generated. """
514 ret = libxml2mod.xmlKeepBlanksDefault(val)
517 def lineNumbersDefault(val):
518 """Set and return the previous value for enabling line numbers
519 in elements contents. This may break on old application and
520 is turned off by default. """
521 ret = libxml2mod.xmlLineNumbersDefault(val)
525 """Allocate and initialize a new parser context. """
526 ret = libxml2mod.xmlNewParserCtxt()
527 if ret is None:raise parserError('xmlNewParserCtxt() failed')
528 return parserCtxt(_obj=ret)
530 def parseDTD(ExternalID, SystemID):
531 """Load and parse an external subset. """
532 ret = libxml2mod.xmlParseDTD(ExternalID, SystemID)
533 if ret is None:raise parserError('xmlParseDTD() failed')
534 return xmlDtd(_obj=ret)
537 """parse an XML in-memory document and build a tree. """
538 ret = libxml2mod.xmlParseDoc(cur)
539 if ret is None:raise parserError('xmlParseDoc() failed')
540 return xmlDoc(_obj=ret)
542 def parseEntity(filename):
543 """parse an XML external entity out of context and build a
544 tree. [78] extParsedEnt ::= TextDecl? content This
545 correspond to a "Well Balanced" chunk """
546 ret = libxml2mod.xmlParseEntity(filename)
547 if ret is None:raise parserError('xmlParseEntity() failed')
548 return xmlDoc(_obj=ret)
550 def parseFile(filename):
551 """parse an XML file and build a tree. Automatic support for
552 ZLIB/Compress compressed document is provided by default if
553 found at compile-time. """
554 ret = libxml2mod.xmlParseFile(filename)
555 if ret is None:raise parserError('xmlParseFile() failed')
556 return xmlDoc(_obj=ret)
558 def parseMemory(buffer, size):
559 """parse an XML in-memory block and build a tree. """
560 ret = libxml2mod.xmlParseMemory(buffer, size)
561 if ret is None:raise parserError('xmlParseMemory() failed')
562 return xmlDoc(_obj=ret)
564 def pedanticParserDefault(val):
565 """Set and return the previous value for enabling pedantic
567 ret = libxml2mod.xmlPedanticParserDefault(val)
570 def readDoc(cur, URL, encoding, options):
571 """parse an XML in-memory document and build a tree. """
572 ret = libxml2mod.xmlReadDoc(cur, URL, encoding, options)
573 if ret is None:raise treeError('xmlReadDoc() failed')
574 return xmlDoc(_obj=ret)
576 def readFd(fd, URL, encoding, options):
577 """parse an XML from a file descriptor and build a tree. NOTE
578 that the file descriptor will not be closed when the reader
579 is closed or reset. """
580 ret = libxml2mod.xmlReadFd(fd, URL, encoding, options)
581 if ret is None:raise treeError('xmlReadFd() failed')
582 return xmlDoc(_obj=ret)
584 def readFile(filename, encoding, options):
585 """parse an XML file from the filesystem or the network. """
586 ret = libxml2mod.xmlReadFile(filename, encoding, options)
587 if ret is None:raise treeError('xmlReadFile() failed')
588 return xmlDoc(_obj=ret)
590 def readMemory(buffer, size, URL, encoding, options):
591 """parse an XML in-memory document and build a tree. """
592 ret = libxml2mod.xmlReadMemory(buffer, size, URL, encoding, options)
593 if ret is None:raise treeError('xmlReadMemory() failed')
594 return xmlDoc(_obj=ret)
597 """parse an XML in-memory document and build a tree. In the
598 case the document is not Well Formed, a attempt to build a
599 tree is tried anyway """
600 ret = libxml2mod.xmlRecoverDoc(cur)
601 if ret is None:raise treeError('xmlRecoverDoc() failed')
602 return xmlDoc(_obj=ret)
604 def recoverFile(filename):
605 """parse an XML file and build a tree. Automatic support for
606 ZLIB/Compress compressed document is provided by default if
607 found at compile-time. In the case the document is not Well
608 Formed, it attempts to build a tree anyway """
609 ret = libxml2mod.xmlRecoverFile(filename)
610 if ret is None:raise treeError('xmlRecoverFile() failed')
611 return xmlDoc(_obj=ret)
613 def recoverMemory(buffer, size):
614 """parse an XML in-memory block and build a tree. In the case
615 the document is not Well Formed, an attempt to build a tree
617 ret = libxml2mod.xmlRecoverMemory(buffer, size)
618 if ret is None:raise treeError('xmlRecoverMemory() failed')
619 return xmlDoc(_obj=ret)
621 def substituteEntitiesDefault(val):
622 """Set and return the previous value for default entity
623 support. Initially the parser always keep entity references
624 instead of substituting entity values in the output. This
625 function has to be used to change the default parser
626 behavior SAX::substituteEntities() has to be used for
627 changing that on a file by file basis. """
628 ret = libxml2mod.xmlSubstituteEntitiesDefault(val)
632 # Functions from module parserInternals
635 def checkLanguageID(lang):
636 """Checks that the value conforms to the LanguageID
637 production: NOTE: this is somewhat deprecated, those
638 productions were removed from the XML Second edition. [33]
639 LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::=
640 ISO639Code | IanaCode | UserCode [35] ISO639Code ::=
641 ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' |
642 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-'
643 ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The
644 current REC reference the sucessors of RFC 1766, currently
645 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag
646 = language ["-" script] ["-" region] *("-" variant) *("-"
647 extension) ["-" privateuse] language = 2*3ALPHA
648 ; shortest ISO 639 code ["-" extlang] ; sometimes
649 followed by ; extended language subtags / 4ALPHA
650 ; or reserved for future use / 5*8ALPHA ; or
651 registered language subtag extlang = 3ALPHA
652 ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently
653 reserved script = 4ALPHA ; ISO 15924
654 code region = 2ALPHA ; ISO 3166-1 code
655 / 3DIGIT ; UN M.49 code variant =
656 5*8alphanum ; registered variants / (DIGIT
657 3alphanum) extension = singleton 1*("-" (2*8alphanum))
658 ; Single alphanumerics ; "x" reserved for private use
659 singleton = DIGIT ; 0 - 9 / %x41-57
660 ; A - W / %x59-5A ; Y - Z / %x61-77
661 ; a - w / %x79-7A ; y - z it sounds right to
662 still allow Irregular i-xxx IANA and user codes too The
663 parser below doesn't try to cope with extension or
664 privateuse that could be added but that's not interoperable
666 ret = libxml2mod.xmlCheckLanguageID(lang)
669 def copyChar(len, out, val):
670 """append the char value in the array """
671 ret = libxml2mod.xmlCopyChar(len, out, val)
674 def copyCharMultiByte(out, val):
675 """append the char value in the array """
676 ret = libxml2mod.xmlCopyCharMultiByte(out, val)
679 def createEntityParserCtxt(URL, ID, base):
680 """Create a parser context for an external entity Automatic
681 support for ZLIB/Compress compressed document is provided
682 by default if found at compile-time. """
683 ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base)
684 if ret is None:raise parserError('xmlCreateEntityParserCtxt() failed')
685 return parserCtxt(_obj=ret)
687 def createFileParserCtxt(filename):
688 """Create a parser context for a file content. Automatic
689 support for ZLIB/Compress compressed document is provided
690 by default if found at compile-time. """
691 ret = libxml2mod.xmlCreateFileParserCtxt(filename)
692 if ret is None:raise parserError('xmlCreateFileParserCtxt() failed')
693 return parserCtxt(_obj=ret)
695 def createMemoryParserCtxt(buffer, size):
696 """Create a parser context for an XML in-memory document. """
697 ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size)
698 if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed')
699 return parserCtxt(_obj=ret)
701 def createURLParserCtxt(filename, options):
702 """Create a parser context for a file or URL content.
703 Automatic support for ZLIB/Compress compressed document is
704 provided by default if found at compile-time and for file
706 ret = libxml2mod.xmlCreateURLParserCtxt(filename, options)
707 if ret is None:raise parserError('xmlCreateURLParserCtxt() failed')
708 return parserCtxt(_obj=ret)
710 def htmlCreateFileParserCtxt(filename, encoding):
711 """Create a parser context for a file content. Automatic
712 support for ZLIB/Compress compressed document is provided
713 by default if found at compile-time. """
714 ret = libxml2mod.htmlCreateFileParserCtxt(filename, encoding)
715 if ret is None:raise parserError('htmlCreateFileParserCtxt() failed')
716 return parserCtxt(_obj=ret)
718 def htmlInitAutoClose():
719 """Initialize the htmlStartCloseIndex for fast lookup of
720 closing tags names. This is not reentrant. Call
721 xmlInitParser() once before processing in case of use in
722 multithreaded programs. """
723 libxml2mod.htmlInitAutoClose()
726 """Check whether the character is allowed by the production
727 [84] Letter ::= BaseChar | Ideographic """
728 ret = libxml2mod.xmlIsLetter(c)
732 """Pops the top element name from the name stack """
733 if ctxt is None: ctxt__o = None
734 else: ctxt__o = ctxt._o
735 ret = libxml2mod.namePop(ctxt__o)
738 def namePush(ctxt, value):
739 """Pushes a new element name on top of the name stack """
740 if ctxt is None: ctxt__o = None
741 else: ctxt__o = ctxt._o
742 ret = libxml2mod.namePush(ctxt__o, value)
746 """Pops the top element node from the node stack """
747 if ctxt is None: ctxt__o = None
748 else: ctxt__o = ctxt._o
749 ret = libxml2mod.nodePop(ctxt__o)
750 if ret is None:raise treeError('nodePop() failed')
751 return xmlNode(_obj=ret)
753 def nodePush(ctxt, value):
754 """Pushes a new element node on top of the node stack """
755 if ctxt is None: ctxt__o = None
756 else: ctxt__o = ctxt._o
757 if value is None: value__o = None
758 else: value__o = value._o
759 ret = libxml2mod.nodePush(ctxt__o, value__o)
763 # Functions from module python
766 def SAXParseFile(SAX, URI, recover):
767 """Interface to parse an XML file or resource pointed by an
768 URI to build an event flow to the SAX object """
769 libxml2mod.xmlSAXParseFile(SAX, URI, recover)
771 def createInputBuffer(file, encoding):
772 """Create a libxml2 input buffer from a Python file """
773 ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
774 if ret is None:raise treeError('xmlCreateInputBuffer() failed')
775 return inputBuffer(_obj=ret)
777 def createOutputBuffer(file, encoding):
778 """Create a libxml2 output buffer from a Python file """
779 ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
780 if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
781 return outputBuffer(_obj=ret)
783 def createPushParser(SAX, chunk, size, URI):
784 """Create a progressive XML parser context to build either an
785 event flow if the SAX object is not None, or a DOM tree
787 ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
788 if ret is None:raise parserError('xmlCreatePushParser() failed')
789 return parserCtxt(_obj=ret)
791 def debugMemory(activate):
792 """Switch on the generation of line number for elements nodes.
793 Also returns the number of bytes allocated and not freed by
794 libxml2 since memory debugging was switched on. """
795 ret = libxml2mod.xmlDebugMemory(activate)
799 """dump the memory allocated in the file .memdump """
800 libxml2mod.xmlDumpMemory()
802 def htmlCreatePushParser(SAX, chunk, size, URI):
803 """Create a progressive HTML parser context to build either an
804 event flow if the SAX object is not None, or a DOM tree
806 ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI)
807 if ret is None:raise parserError('htmlCreatePushParser() failed')
808 return parserCtxt(_obj=ret)
810 def htmlSAXParseFile(SAX, URI, encoding):
811 """Interface to parse an HTML file or resource pointed by an
812 URI to build an event flow to the SAX object """
813 libxml2mod.htmlSAXParseFile(SAX, URI, encoding)
816 """Returns the total amount of memory allocated by libxml2 """
817 ret = libxml2mod.xmlMemoryUsed()
821 """Create a new Node """
822 ret = libxml2mod.xmlNewNode(name)
823 if ret is None:raise treeError('xmlNewNode() failed')
824 return xmlNode(_obj=ret)
826 def pythonCleanupParser():
827 """Cleanup function for the XML library. It tries to reclaim
828 all parsing related global memory allocated for the library
829 processing. It doesn't deallocate any document related
830 memory. Calling this function should not prevent reusing
831 the library but one should call xmlCleanupParser() only
832 when the process has finished using the library or XML
833 document built with it. """
834 libxml2mod.xmlPythonCleanupParser()
836 def setEntityLoader(resolver):
837 """Set the entity resolver as a python function """
838 ret = libxml2mod.xmlSetEntityLoader(resolver)
842 # Functions from module relaxng
845 def relaxNGCleanupTypes():
846 """Cleanup the default Schemas type library associated to
848 libxml2mod.xmlRelaxNGCleanupTypes()
850 def relaxNGInitTypes():
851 """Initilize the default type libraries. """
852 ret = libxml2mod.xmlRelaxNGInitTypes()
855 def relaxNGNewMemParserCtxt(buffer, size):
856 """Create an XML RelaxNGs parse context for that memory buffer
857 expected to contain an XML RelaxNGs file. """
858 ret = libxml2mod.xmlRelaxNGNewMemParserCtxt(buffer, size)
859 if ret is None:raise parserError('xmlRelaxNGNewMemParserCtxt() failed')
860 return relaxNgParserCtxt(_obj=ret)
862 def relaxNGNewParserCtxt(URL):
863 """Create an XML RelaxNGs parse context for that file/resource
864 expected to contain an XML RelaxNGs file. """
865 ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL)
866 if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed')
867 return relaxNgParserCtxt(_obj=ret)
870 # Functions from module tree
873 def buildQName(ncname, prefix, memory, len):
874 """Builds the QName @prefix:@ncname in @memory if there is
875 enough space and prefix is not None nor empty, otherwise
876 allocate a new string. If prefix is None or empty it
878 ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)
882 """get the default compression mode used, ZLIB based. """
883 ret = libxml2mod.xmlGetCompressMode()
886 def isXHTML(systemID, publicID):
887 """Try to find if the document correspond to an XHTML DTD """
888 ret = libxml2mod.xmlIsXHTML(systemID, publicID)
891 def newComment(content):
892 """Creation of a new node containing a comment. """
893 ret = libxml2mod.xmlNewComment(content)
894 if ret is None:raise treeError('xmlNewComment() failed')
895 return xmlNode(_obj=ret)
898 """Creates a new XML document """
899 ret = libxml2mod.xmlNewDoc(version)
900 if ret is None:raise treeError('xmlNewDoc() failed')
901 return xmlDoc(_obj=ret)
903 def newPI(name, content):
904 """Creation of a processing instruction element. Use
905 xmlDocNewPI preferably to get string interning """
906 ret = libxml2mod.xmlNewPI(name, content)
907 if ret is None:raise treeError('xmlNewPI() failed')
908 return xmlNode(_obj=ret)
910 def newText(content):
911 """Creation of a new text node. """
912 ret = libxml2mod.xmlNewText(content)
913 if ret is None:raise treeError('xmlNewText() failed')
914 return xmlNode(_obj=ret)
916 def newTextLen(content, len):
917 """Creation of a new text node with an extra parameter for the
919 ret = libxml2mod.xmlNewTextLen(content, len)
920 if ret is None:raise treeError('xmlNewTextLen() failed')
921 return xmlNode(_obj=ret)
923 def setCompressMode(mode):
924 """set the default compression mode used, ZLIB based Correct
925 values: 0 (uncompressed) to 9 (max compression) """
926 libxml2mod.xmlSetCompressMode(mode)
928 def validateNCName(value, space):
929 """Check that a value conforms to the lexical space of NCName """
930 ret = libxml2mod.xmlValidateNCName(value, space)
933 def validateNMToken(value, space):
934 """Check that a value conforms to the lexical space of NMToken """
935 ret = libxml2mod.xmlValidateNMToken(value, space)
938 def validateName(value, space):
939 """Check that a value conforms to the lexical space of Name """
940 ret = libxml2mod.xmlValidateName(value, space)
943 def validateQName(value, space):
944 """Check that a value conforms to the lexical space of QName """
945 ret = libxml2mod.xmlValidateQName(value, space)
949 # Functions from module uri
953 """Escaping routine, does not do validity checks ! It will try
954 to escape the chars needing this, but this is heuristic
955 based it's impossible to be sure. """
956 ret = libxml2mod.xmlURIEscape(str)
959 def URIEscapeStr(str, list):
960 """This routine escapes a string to hex, ignoring reserved
961 characters (a-z) and the characters in the exception list. """
962 ret = libxml2mod.xmlURIEscapeStr(str, list)
965 def URIUnescapeString(str, len, target):
966 """Unescaping routine, but does not check that the string is
967 an URI. The output is a direct unsigned char translation of
968 %XX values (no encoding) Note that the length of the result
969 can only be smaller or same size as the input string. """
970 ret = libxml2mod.xmlURIUnescapeString(str, len, target)
973 def buildRelativeURI(URI, base):
974 """Expresses the URI of the reference in terms relative to the
975 base. Some examples of this operation include: base =
976 "http://site1.com/docs/book1.html" URI input
977 URI returned docs/pic1.gif pic1.gif
978 docs/img/pic1.gif img/pic1.gif img/pic1.gif
979 ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif
980 http://site2.com/docs/pic1.gif
981 http://site2.com/docs/pic1.gif base = "docs/book1.html"
982 URI input URI returned docs/pic1.gif
983 pic1.gif docs/img/pic1.gif img/pic1.gif
984 img/pic1.gif ../img/pic1.gif
985 http://site1.com/docs/pic1.gif
986 http://site1.com/docs/pic1.gif Note: if the URI reference
987 is really wierd or complicated, it may be worthwhile to
988 first convert it into a "nice" one by calling xmlBuildURI
989 (using 'base') before calling this routine, since this
990 routine (for reasonable efficiency) assumes URI has already
991 been through some validation. """
992 ret = libxml2mod.xmlBuildRelativeURI(URI, base)
995 def buildURI(URI, base):
996 """Computes he final URI of the reference done by checking
997 that the given URI is valid, and building the final URI
998 using the base URI. This is processed according to section
999 5.2 of the RFC 2396 5.2. Resolving Relative References to
1001 ret = libxml2mod.xmlBuildURI(URI, base)
1004 def canonicPath(path):
1005 """Constructs a canonic path from the specified path. """
1006 ret = libxml2mod.xmlCanonicPath(path)
1010 """Simply creates an empty xmlURI """
1011 ret = libxml2mod.xmlCreateURI()
1012 if ret is None:raise uriError('xmlCreateURI() failed')
1013 return URI(_obj=ret)
1015 def normalizeURIPath(path):
1016 """Applies the 5 normalization steps to a path string--that
1017 is, RFC 2396 Section 5.2, steps 6.c through 6.g.
1018 Normalization occurs directly on the string, no new
1019 allocation is done """
1020 ret = libxml2mod.xmlNormalizeURIPath(path)
1024 """Parse an URI based on RFC 3986 URI-reference = [
1025 absoluteURI | relativeURI ] [ "#" fragment ] """
1026 ret = libxml2mod.xmlParseURI(str)
1027 if ret is None:raise uriError('xmlParseURI() failed')
1028 return URI(_obj=ret)
1030 def parseURIRaw(str, raw):
1031 """Parse an URI but allows to keep intact the original
1032 fragments. URI-reference = URI / relative-ref """
1033 ret = libxml2mod.xmlParseURIRaw(str, raw)
1034 if ret is None:raise uriError('xmlParseURIRaw() failed')
1035 return URI(_obj=ret)
1037 def pathToURI(path):
1038 """Constructs an URI expressing the existing path """
1039 ret = libxml2mod.xmlPathToURI(path)
1043 # Functions from module valid
1047 """Allocate a validation context structure. """
1048 ret = libxml2mod.xmlNewValidCtxt()
1049 if ret is None:raise treeError('xmlNewValidCtxt() failed')
1050 return ValidCtxt(_obj=ret)
1052 def validateNameValue(value):
1053 """Validate that the given value match Name production """
1054 ret = libxml2mod.xmlValidateNameValue(value)
1057 def validateNamesValue(value):
1058 """Validate that the given value match Names production """
1059 ret = libxml2mod.xmlValidateNamesValue(value)
1062 def validateNmtokenValue(value):
1063 """Validate that the given value match Nmtoken production [
1064 VC: Name Token ] """
1065 ret = libxml2mod.xmlValidateNmtokenValue(value)
1068 def validateNmtokensValue(value):
1069 """Validate that the given value match Nmtokens production [
1070 VC: Name Token ] """
1071 ret = libxml2mod.xmlValidateNmtokensValue(value)
1075 # Functions from module xmlIO
1078 def checkFilename(path):
1079 """function checks to see if @path is a valid source (file,
1080 socket...) for XML. if stat is not available on the target
1082 ret = libxml2mod.xmlCheckFilename(path)
1085 def cleanupInputCallbacks():
1086 """clears the entire input callback table. this includes the
1087 compiled-in I/O. """
1088 libxml2mod.xmlCleanupInputCallbacks()
1090 def cleanupOutputCallbacks():
1091 """clears the entire output callback table. this includes the
1092 compiled-in I/O callbacks. """
1093 libxml2mod.xmlCleanupOutputCallbacks()
1095 def fileMatch(filename):
1096 """input from FILE * """
1097 ret = libxml2mod.xmlFileMatch(filename)
1100 def iOFTPMatch(filename):
1101 """check if the URI matches an FTP one """
1102 ret = libxml2mod.xmlIOFTPMatch(filename)
1105 def iOHTTPMatch(filename):
1106 """check if the URI matches an HTTP one """
1107 ret = libxml2mod.xmlIOHTTPMatch(filename)
1110 def normalizeWindowsPath(path):
1111 """This function is obsolete. Please see xmlURIFromPath in
1112 uri.c for a better solution. """
1113 ret = libxml2mod.xmlNormalizeWindowsPath(path)
1116 def parserGetDirectory(filename):
1117 """lookup the directory for that file """
1118 ret = libxml2mod.xmlParserGetDirectory(filename)
1121 def registerDefaultInputCallbacks():
1122 """Registers the default compiled-in I/O handlers. """
1123 libxml2mod.xmlRegisterDefaultInputCallbacks()
1125 def registerDefaultOutputCallbacks():
1126 """Registers the default compiled-in I/O handlers. """
1127 libxml2mod.xmlRegisterDefaultOutputCallbacks()
1129 def registerHTTPPostCallbacks():
1130 """By default, libxml submits HTTP output requests using the
1131 "PUT" method. Calling this method changes the HTTP output
1132 method to use the "POST" method instead. """
1133 libxml2mod.xmlRegisterHTTPPostCallbacks()
1136 # Functions from module xmlerror
1140 """Get the last global error registered. This is per thread if
1141 compiled with thread support. """
1142 ret = libxml2mod.xmlGetLastError()
1143 if ret is None:raise treeError('xmlGetLastError() failed')
1144 return Error(_obj=ret)
1146 def resetLastError():
1147 """Cleanup the last global error registered. For parsing error
1148 this does not change the well-formedness result. """
1149 libxml2mod.xmlResetLastError()
1152 # Functions from module xmlreader
1155 def newTextReaderFilename(URI):
1156 """Create an xmlTextReader structure fed with the resource at
1158 ret = libxml2mod.xmlNewTextReaderFilename(URI)
1159 if ret is None:raise treeError('xmlNewTextReaderFilename() failed')
1160 return xmlTextReader(_obj=ret)
1162 def readerForDoc(cur, URL, encoding, options):
1163 """Create an xmltextReader for an XML in-memory document. The
1164 parsing flags @options are a combination of xmlParserOption. """
1165 ret = libxml2mod.xmlReaderForDoc(cur, URL, encoding, options)
1166 if ret is None:raise treeError('xmlReaderForDoc() failed')
1167 return xmlTextReader(_obj=ret)
1169 def readerForFd(fd, URL, encoding, options):
1170 """Create an xmltextReader for an XML from a file descriptor.
1171 The parsing flags @options are a combination of
1172 xmlParserOption. NOTE that the file descriptor will not be
1173 closed when the reader is closed or reset. """
1174 ret = libxml2mod.xmlReaderForFd(fd, URL, encoding, options)
1175 if ret is None:raise treeError('xmlReaderForFd() failed')
1176 return xmlTextReader(_obj=ret)
1178 def readerForFile(filename, encoding, options):
1179 """parse an XML file from the filesystem or the network. The
1180 parsing flags @options are a combination of xmlParserOption. """
1181 ret = libxml2mod.xmlReaderForFile(filename, encoding, options)
1182 if ret is None:raise treeError('xmlReaderForFile() failed')
1183 return xmlTextReader(_obj=ret)
1185 def readerForMemory(buffer, size, URL, encoding, options):
1186 """Create an xmltextReader for an XML in-memory document. The
1187 parsing flags @options are a combination of xmlParserOption. """
1188 ret = libxml2mod.xmlReaderForMemory(buffer, size, URL, encoding, options)
1189 if ret is None:raise treeError('xmlReaderForMemory() failed')
1190 return xmlTextReader(_obj=ret)
1193 # Functions from module xmlregexp
1196 def regexpCompile(regexp):
1197 """Parses a regular expression conforming to XML Schemas Part
1198 2 Datatype Appendix F and builds an automata suitable for
1199 testing strings against that regular expression """
1200 ret = libxml2mod.xmlRegexpCompile(regexp)
1201 if ret is None:raise treeError('xmlRegexpCompile() failed')
1202 return xmlReg(_obj=ret)
1205 # Functions from module xmlschemas
1208 def schemaNewMemParserCtxt(buffer, size):
1209 """Create an XML Schemas parse context for that memory buffer
1210 expected to contain an XML Schemas file. """
1211 ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)
1212 if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')
1213 return SchemaParserCtxt(_obj=ret)
1215 def schemaNewParserCtxt(URL):
1216 """Create an XML Schemas parse context for that file/resource
1217 expected to contain an XML Schemas file. """
1218 ret = libxml2mod.xmlSchemaNewParserCtxt(URL)
1219 if ret is None:raise parserError('xmlSchemaNewParserCtxt() failed')
1220 return SchemaParserCtxt(_obj=ret)
1223 # Functions from module xmlschemastypes
1226 def schemaCleanupTypes():
1227 """Cleanup the default XML Schemas type library """
1228 libxml2mod.xmlSchemaCleanupTypes()
1230 def schemaCollapseString(value):
1231 """Removes and normalize white spaces in the string """
1232 ret = libxml2mod.xmlSchemaCollapseString(value)
1235 def schemaInitTypes():
1236 """Initialize the default XML Schemas type library """
1237 libxml2mod.xmlSchemaInitTypes()
1239 def schemaWhiteSpaceReplace(value):
1240 """Replaces 0xd, 0x9 and 0xa with a space. """
1241 ret = libxml2mod.xmlSchemaWhiteSpaceReplace(value)
1245 # Functions from module xmlstring
1248 def UTF8Charcmp(utf1, utf2):
1249 """compares the two UCS4 values """
1250 ret = libxml2mod.xmlUTF8Charcmp(utf1, utf2)
1254 """calculates the internal size of a UTF8 character """
1255 ret = libxml2mod.xmlUTF8Size(utf)
1258 def UTF8Strlen(utf):
1259 """compute the length of an UTF8 string, it doesn't do a full
1260 UTF8 checking of the content of the string. """
1261 ret = libxml2mod.xmlUTF8Strlen(utf)
1264 def UTF8Strloc(utf, utfchar):
1265 """a function to provide the relative location of a UTF8 char """
1266 ret = libxml2mod.xmlUTF8Strloc(utf, utfchar)
1269 def UTF8Strndup(utf, len):
1270 """a strndup for array of UTF8's """
1271 ret = libxml2mod.xmlUTF8Strndup(utf, len)
1274 def UTF8Strpos(utf, pos):
1275 """a function to provide the equivalent of fetching a
1276 character from a string array """
1277 ret = libxml2mod.xmlUTF8Strpos(utf, pos)
1280 def UTF8Strsize(utf, len):
1281 """storage size of an UTF8 string the behaviour is not
1282 guaranteed if the input string is not UTF-8 """
1283 ret = libxml2mod.xmlUTF8Strsize(utf, len)
1286 def UTF8Strsub(utf, start, len):
1287 """Create a substring from a given UTF-8 string Note:
1288 positions are given in units of UTF-8 chars """
1289 ret = libxml2mod.xmlUTF8Strsub(utf, start, len)
1293 """Checks @utf for being valid UTF-8. @utf is assumed to be
1294 null-terminated. This function is not super-strict, as it
1295 will allow longer UTF-8 sequences than necessary. Note that
1296 Java is capable of producing these sequences if provoked.
1297 Also note, this routine checks for the 4-byte maximum size,
1298 but does not check for 0x10ffff maximum value. """
1299 ret = libxml2mod.xmlCheckUTF8(utf)
1303 # Functions from module xmlunicode
1306 def uCSIsAegeanNumbers(code):
1307 """Check whether the character is part of AegeanNumbers UCS
1309 ret = libxml2mod.xmlUCSIsAegeanNumbers(code)
1312 def uCSIsAlphabeticPresentationForms(code):
1313 """Check whether the character is part of
1314 AlphabeticPresentationForms UCS Block """
1315 ret = libxml2mod.xmlUCSIsAlphabeticPresentationForms(code)
1318 def uCSIsArabic(code):
1319 """Check whether the character is part of Arabic UCS Block """
1320 ret = libxml2mod.xmlUCSIsArabic(code)
1323 def uCSIsArabicPresentationFormsA(code):
1324 """Check whether the character is part of
1325 ArabicPresentationForms-A UCS Block """
1326 ret = libxml2mod.xmlUCSIsArabicPresentationFormsA(code)
1329 def uCSIsArabicPresentationFormsB(code):
1330 """Check whether the character is part of
1331 ArabicPresentationForms-B UCS Block """
1332 ret = libxml2mod.xmlUCSIsArabicPresentationFormsB(code)
1335 def uCSIsArmenian(code):
1336 """Check whether the character is part of Armenian UCS Block """
1337 ret = libxml2mod.xmlUCSIsArmenian(code)
1340 def uCSIsArrows(code):
1341 """Check whether the character is part of Arrows UCS Block """
1342 ret = libxml2mod.xmlUCSIsArrows(code)
1345 def uCSIsBasicLatin(code):
1346 """Check whether the character is part of BasicLatin UCS Block """
1347 ret = libxml2mod.xmlUCSIsBasicLatin(code)
1350 def uCSIsBengali(code):
1351 """Check whether the character is part of Bengali UCS Block """
1352 ret = libxml2mod.xmlUCSIsBengali(code)
1355 def uCSIsBlock(code, block):
1356 """Check whether the character is part of the UCS Block """
1357 ret = libxml2mod.xmlUCSIsBlock(code, block)
1360 def uCSIsBlockElements(code):
1361 """Check whether the character is part of BlockElements UCS
1363 ret = libxml2mod.xmlUCSIsBlockElements(code)
1366 def uCSIsBopomofo(code):
1367 """Check whether the character is part of Bopomofo UCS Block """
1368 ret = libxml2mod.xmlUCSIsBopomofo(code)
1371 def uCSIsBopomofoExtended(code):
1372 """Check whether the character is part of BopomofoExtended UCS
1374 ret = libxml2mod.xmlUCSIsBopomofoExtended(code)
1377 def uCSIsBoxDrawing(code):
1378 """Check whether the character is part of BoxDrawing UCS Block """
1379 ret = libxml2mod.xmlUCSIsBoxDrawing(code)
1382 def uCSIsBraillePatterns(code):
1383 """Check whether the character is part of BraillePatterns UCS
1385 ret = libxml2mod.xmlUCSIsBraillePatterns(code)
1388 def uCSIsBuhid(code):
1389 """Check whether the character is part of Buhid UCS Block """
1390 ret = libxml2mod.xmlUCSIsBuhid(code)
1393 def uCSIsByzantineMusicalSymbols(code):
1394 """Check whether the character is part of
1395 ByzantineMusicalSymbols UCS Block """
1396 ret = libxml2mod.xmlUCSIsByzantineMusicalSymbols(code)
1399 def uCSIsCJKCompatibility(code):
1400 """Check whether the character is part of CJKCompatibility UCS
1402 ret = libxml2mod.xmlUCSIsCJKCompatibility(code)
1405 def uCSIsCJKCompatibilityForms(code):
1406 """Check whether the character is part of
1407 CJKCompatibilityForms UCS Block """
1408 ret = libxml2mod.xmlUCSIsCJKCompatibilityForms(code)
1411 def uCSIsCJKCompatibilityIdeographs(code):
1412 """Check whether the character is part of
1413 CJKCompatibilityIdeographs UCS Block """
1414 ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographs(code)
1417 def uCSIsCJKCompatibilityIdeographsSupplement(code):
1418 """Check whether the character is part of
1419 CJKCompatibilityIdeographsSupplement UCS Block """
1420 ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographsSupplement(code)
1423 def uCSIsCJKRadicalsSupplement(code):
1424 """Check whether the character is part of
1425 CJKRadicalsSupplement UCS Block """
1426 ret = libxml2mod.xmlUCSIsCJKRadicalsSupplement(code)
1429 def uCSIsCJKSymbolsandPunctuation(code):
1430 """Check whether the character is part of
1431 CJKSymbolsandPunctuation UCS Block """
1432 ret = libxml2mod.xmlUCSIsCJKSymbolsandPunctuation(code)
1435 def uCSIsCJKUnifiedIdeographs(code):
1436 """Check whether the character is part of CJKUnifiedIdeographs
1438 ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographs(code)
1441 def uCSIsCJKUnifiedIdeographsExtensionA(code):
1442 """Check whether the character is part of
1443 CJKUnifiedIdeographsExtensionA UCS Block """
1444 ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionA(code)
1447 def uCSIsCJKUnifiedIdeographsExtensionB(code):
1448 """Check whether the character is part of
1449 CJKUnifiedIdeographsExtensionB UCS Block """
1450 ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionB(code)
1453 def uCSIsCat(code, cat):
1454 """Check whether the character is part of the UCS Category """
1455 ret = libxml2mod.xmlUCSIsCat(code, cat)
1458 def uCSIsCatC(code):
1459 """Check whether the character is part of C UCS Category """
1460 ret = libxml2mod.xmlUCSIsCatC(code)
1463 def uCSIsCatCc(code):
1464 """Check whether the character is part of Cc UCS Category """
1465 ret = libxml2mod.xmlUCSIsCatCc(code)
1468 def uCSIsCatCf(code):
1469 """Check whether the character is part of Cf UCS Category """
1470 ret = libxml2mod.xmlUCSIsCatCf(code)
1473 def uCSIsCatCo(code):
1474 """Check whether the character is part of Co UCS Category """
1475 ret = libxml2mod.xmlUCSIsCatCo(code)
1478 def uCSIsCatCs(code):
1479 """Check whether the character is part of Cs UCS Category """
1480 ret = libxml2mod.xmlUCSIsCatCs(code)
1483 def uCSIsCatL(code):
1484 """Check whether the character is part of L UCS Category """
1485 ret = libxml2mod.xmlUCSIsCatL(code)
1488 def uCSIsCatLl(code):
1489 """Check whether the character is part of Ll UCS Category """
1490 ret = libxml2mod.xmlUCSIsCatLl(code)
1493 def uCSIsCatLm(code):
1494 """Check whether the character is part of Lm UCS Category """
1495 ret = libxml2mod.xmlUCSIsCatLm(code)
1498 def uCSIsCatLo(code):
1499 """Check whether the character is part of Lo UCS Category """
1500 ret = libxml2mod.xmlUCSIsCatLo(code)
1503 def uCSIsCatLt(code):
1504 """Check whether the character is part of Lt UCS Category """
1505 ret = libxml2mod.xmlUCSIsCatLt(code)
1508 def uCSIsCatLu(code):
1509 """Check whether the character is part of Lu UCS Category """
1510 ret = libxml2mod.xmlUCSIsCatLu(code)
1513 def uCSIsCatM(code):
1514 """Check whether the character is part of M UCS Category """
1515 ret = libxml2mod.xmlUCSIsCatM(code)
1518 def uCSIsCatMc(code):
1519 """Check whether the character is part of Mc UCS Category """
1520 ret = libxml2mod.xmlUCSIsCatMc(code)
1523 def uCSIsCatMe(code):
1524 """Check whether the character is part of Me UCS Category """
1525 ret = libxml2mod.xmlUCSIsCatMe(code)
1528 def uCSIsCatMn(code):
1529 """Check whether the character is part of Mn UCS Category """
1530 ret = libxml2mod.xmlUCSIsCatMn(code)
1533 def uCSIsCatN(code):
1534 """Check whether the character is part of N UCS Category """
1535 ret = libxml2mod.xmlUCSIsCatN(code)
1538 def uCSIsCatNd(code):
1539 """Check whether the character is part of Nd UCS Category """
1540 ret = libxml2mod.xmlUCSIsCatNd(code)
1543 def uCSIsCatNl(code):
1544 """Check whether the character is part of Nl UCS Category """
1545 ret = libxml2mod.xmlUCSIsCatNl(code)
1548 def uCSIsCatNo(code):
1549 """Check whether the character is part of No UCS Category """
1550 ret = libxml2mod.xmlUCSIsCatNo(code)
1553 def uCSIsCatP(code):
1554 """Check whether the character is part of P UCS Category """
1555 ret = libxml2mod.xmlUCSIsCatP(code)
1558 def uCSIsCatPc(code):
1559 """Check whether the character is part of Pc UCS Category """
1560 ret = libxml2mod.xmlUCSIsCatPc(code)
1563 def uCSIsCatPd(code):
1564 """Check whether the character is part of Pd UCS Category """
1565 ret = libxml2mod.xmlUCSIsCatPd(code)
1568 def uCSIsCatPe(code):
1569 """Check whether the character is part of Pe UCS Category """
1570 ret = libxml2mod.xmlUCSIsCatPe(code)
1573 def uCSIsCatPf(code):
1574 """Check whether the character is part of Pf UCS Category """
1575 ret = libxml2mod.xmlUCSIsCatPf(code)
1578 def uCSIsCatPi(code):
1579 """Check whether the character is part of Pi UCS Category """
1580 ret = libxml2mod.xmlUCSIsCatPi(code)
1583 def uCSIsCatPo(code):
1584 """Check whether the character is part of Po UCS Category """
1585 ret = libxml2mod.xmlUCSIsCatPo(code)
1588 def uCSIsCatPs(code):
1589 """Check whether the character is part of Ps UCS Category """
1590 ret = libxml2mod.xmlUCSIsCatPs(code)
1593 def uCSIsCatS(code):
1594 """Check whether the character is part of S UCS Category """
1595 ret = libxml2mod.xmlUCSIsCatS(code)
1598 def uCSIsCatSc(code):
1599 """Check whether the character is part of Sc UCS Category """
1600 ret = libxml2mod.xmlUCSIsCatSc(code)
1603 def uCSIsCatSk(code):
1604 """Check whether the character is part of Sk UCS Category """
1605 ret = libxml2mod.xmlUCSIsCatSk(code)
1608 def uCSIsCatSm(code):
1609 """Check whether the character is part of Sm UCS Category """
1610 ret = libxml2mod.xmlUCSIsCatSm(code)
1613 def uCSIsCatSo(code):
1614 """Check whether the character is part of So UCS Category """
1615 ret = libxml2mod.xmlUCSIsCatSo(code)
1618 def uCSIsCatZ(code):
1619 """Check whether the character is part of Z UCS Category """
1620 ret = libxml2mod.xmlUCSIsCatZ(code)
1623 def uCSIsCatZl(code):
1624 """Check whether the character is part of Zl UCS Category """
1625 ret = libxml2mod.xmlUCSIsCatZl(code)
1628 def uCSIsCatZp(code):
1629 """Check whether the character is part of Zp UCS Category """
1630 ret = libxml2mod.xmlUCSIsCatZp(code)
1633 def uCSIsCatZs(code):
1634 """Check whether the character is part of Zs UCS Category """
1635 ret = libxml2mod.xmlUCSIsCatZs(code)
1638 def uCSIsCherokee(code):
1639 """Check whether the character is part of Cherokee UCS Block """
1640 ret = libxml2mod.xmlUCSIsCherokee(code)
1643 def uCSIsCombiningDiacriticalMarks(code):
1644 """Check whether the character is part of
1645 CombiningDiacriticalMarks UCS Block """
1646 ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarks(code)
1649 def uCSIsCombiningDiacriticalMarksforSymbols(code):
1650 """Check whether the character is part of
1651 CombiningDiacriticalMarksforSymbols UCS Block """
1652 ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarksforSymbols(code)
1655 def uCSIsCombiningHalfMarks(code):
1656 """Check whether the character is part of CombiningHalfMarks
1658 ret = libxml2mod.xmlUCSIsCombiningHalfMarks(code)
1661 def uCSIsCombiningMarksforSymbols(code):
1662 """Check whether the character is part of
1663 CombiningMarksforSymbols UCS Block """
1664 ret = libxml2mod.xmlUCSIsCombiningMarksforSymbols(code)
1667 def uCSIsControlPictures(code):
1668 """Check whether the character is part of ControlPictures UCS
1670 ret = libxml2mod.xmlUCSIsControlPictures(code)
1673 def uCSIsCurrencySymbols(code):
1674 """Check whether the character is part of CurrencySymbols UCS
1676 ret = libxml2mod.xmlUCSIsCurrencySymbols(code)
1679 def uCSIsCypriotSyllabary(code):
1680 """Check whether the character is part of CypriotSyllabary UCS
1682 ret = libxml2mod.xmlUCSIsCypriotSyllabary(code)
1685 def uCSIsCyrillic(code):
1686 """Check whether the character is part of Cyrillic UCS Block """
1687 ret = libxml2mod.xmlUCSIsCyrillic(code)
1690 def uCSIsCyrillicSupplement(code):
1691 """Check whether the character is part of CyrillicSupplement
1693 ret = libxml2mod.xmlUCSIsCyrillicSupplement(code)
1696 def uCSIsDeseret(code):
1697 """Check whether the character is part of Deseret UCS Block """
1698 ret = libxml2mod.xmlUCSIsDeseret(code)
1701 def uCSIsDevanagari(code):
1702 """Check whether the character is part of Devanagari UCS Block """
1703 ret = libxml2mod.xmlUCSIsDevanagari(code)
1706 def uCSIsDingbats(code):
1707 """Check whether the character is part of Dingbats UCS Block """
1708 ret = libxml2mod.xmlUCSIsDingbats(code)
1711 def uCSIsEnclosedAlphanumerics(code):
1712 """Check whether the character is part of
1713 EnclosedAlphanumerics UCS Block """
1714 ret = libxml2mod.xmlUCSIsEnclosedAlphanumerics(code)
1717 def uCSIsEnclosedCJKLettersandMonths(code):
1718 """Check whether the character is part of
1719 EnclosedCJKLettersandMonths UCS Block """
1720 ret = libxml2mod.xmlUCSIsEnclosedCJKLettersandMonths(code)
1723 def uCSIsEthiopic(code):
1724 """Check whether the character is part of Ethiopic UCS Block """
1725 ret = libxml2mod.xmlUCSIsEthiopic(code)
1728 def uCSIsGeneralPunctuation(code):
1729 """Check whether the character is part of GeneralPunctuation
1731 ret = libxml2mod.xmlUCSIsGeneralPunctuation(code)
1734 def uCSIsGeometricShapes(code):
1735 """Check whether the character is part of GeometricShapes UCS
1737 ret = libxml2mod.xmlUCSIsGeometricShapes(code)
1740 def uCSIsGeorgian(code):
1741 """Check whether the character is part of Georgian UCS Block """
1742 ret = libxml2mod.xmlUCSIsGeorgian(code)
1745 def uCSIsGothic(code):
1746 """Check whether the character is part of Gothic UCS Block """
1747 ret = libxml2mod.xmlUCSIsGothic(code)
1750 def uCSIsGreek(code):
1751 """Check whether the character is part of Greek UCS Block """
1752 ret = libxml2mod.xmlUCSIsGreek(code)
1755 def uCSIsGreekExtended(code):
1756 """Check whether the character is part of GreekExtended UCS
1758 ret = libxml2mod.xmlUCSIsGreekExtended(code)
1761 def uCSIsGreekandCoptic(code):
1762 """Check whether the character is part of GreekandCoptic UCS
1764 ret = libxml2mod.xmlUCSIsGreekandCoptic(code)
1767 def uCSIsGujarati(code):
1768 """Check whether the character is part of Gujarati UCS Block """
1769 ret = libxml2mod.xmlUCSIsGujarati(code)
1772 def uCSIsGurmukhi(code):
1773 """Check whether the character is part of Gurmukhi UCS Block """
1774 ret = libxml2mod.xmlUCSIsGurmukhi(code)
1777 def uCSIsHalfwidthandFullwidthForms(code):
1778 """Check whether the character is part of
1779 HalfwidthandFullwidthForms UCS Block """
1780 ret = libxml2mod.xmlUCSIsHalfwidthandFullwidthForms(code)
1783 def uCSIsHangulCompatibilityJamo(code):
1784 """Check whether the character is part of
1785 HangulCompatibilityJamo UCS Block """
1786 ret = libxml2mod.xmlUCSIsHangulCompatibilityJamo(code)
1789 def uCSIsHangulJamo(code):
1790 """Check whether the character is part of HangulJamo UCS Block """
1791 ret = libxml2mod.xmlUCSIsHangulJamo(code)
1794 def uCSIsHangulSyllables(code):
1795 """Check whether the character is part of HangulSyllables UCS
1797 ret = libxml2mod.xmlUCSIsHangulSyllables(code)
1800 def uCSIsHanunoo(code):
1801 """Check whether the character is part of Hanunoo UCS Block """
1802 ret = libxml2mod.xmlUCSIsHanunoo(code)
1805 def uCSIsHebrew(code):
1806 """Check whether the character is part of Hebrew UCS Block """
1807 ret = libxml2mod.xmlUCSIsHebrew(code)
1810 def uCSIsHighPrivateUseSurrogates(code):
1811 """Check whether the character is part of
1812 HighPrivateUseSurrogates UCS Block """
1813 ret = libxml2mod.xmlUCSIsHighPrivateUseSurrogates(code)
1816 def uCSIsHighSurrogates(code):
1817 """Check whether the character is part of HighSurrogates UCS
1819 ret = libxml2mod.xmlUCSIsHighSurrogates(code)
1822 def uCSIsHiragana(code):
1823 """Check whether the character is part of Hiragana UCS Block """
1824 ret = libxml2mod.xmlUCSIsHiragana(code)
1827 def uCSIsIPAExtensions(code):
1828 """Check whether the character is part of IPAExtensions UCS
1830 ret = libxml2mod.xmlUCSIsIPAExtensions(code)
1833 def uCSIsIdeographicDescriptionCharacters(code):
1834 """Check whether the character is part of
1835 IdeographicDescriptionCharacters UCS Block """
1836 ret = libxml2mod.xmlUCSIsIdeographicDescriptionCharacters(code)
1839 def uCSIsKanbun(code):
1840 """Check whether the character is part of Kanbun UCS Block """
1841 ret = libxml2mod.xmlUCSIsKanbun(code)
1844 def uCSIsKangxiRadicals(code):
1845 """Check whether the character is part of KangxiRadicals UCS
1847 ret = libxml2mod.xmlUCSIsKangxiRadicals(code)
1850 def uCSIsKannada(code):
1851 """Check whether the character is part of Kannada UCS Block """
1852 ret = libxml2mod.xmlUCSIsKannada(code)
1855 def uCSIsKatakana(code):
1856 """Check whether the character is part of Katakana UCS Block """
1857 ret = libxml2mod.xmlUCSIsKatakana(code)
1860 def uCSIsKatakanaPhoneticExtensions(code):
1861 """Check whether the character is part of
1862 KatakanaPhoneticExtensions UCS Block """
1863 ret = libxml2mod.xmlUCSIsKatakanaPhoneticExtensions(code)
1866 def uCSIsKhmer(code):
1867 """Check whether the character is part of Khmer UCS Block """
1868 ret = libxml2mod.xmlUCSIsKhmer(code)
1871 def uCSIsKhmerSymbols(code):
1872 """Check whether the character is part of KhmerSymbols UCS
1874 ret = libxml2mod.xmlUCSIsKhmerSymbols(code)
1878 """Check whether the character is part of Lao UCS Block """
1879 ret = libxml2mod.xmlUCSIsLao(code)
1882 def uCSIsLatin1Supplement(code):
1883 """Check whether the character is part of Latin-1Supplement
1885 ret = libxml2mod.xmlUCSIsLatin1Supplement(code)
1888 def uCSIsLatinExtendedA(code):
1889 """Check whether the character is part of LatinExtended-A UCS
1891 ret = libxml2mod.xmlUCSIsLatinExtendedA(code)
1894 def uCSIsLatinExtendedAdditional(code):
1895 """Check whether the character is part of
1896 LatinExtendedAdditional UCS Block """
1897 ret = libxml2mod.xmlUCSIsLatinExtendedAdditional(code)
1900 def uCSIsLatinExtendedB(code):
1901 """Check whether the character is part of LatinExtended-B UCS
1903 ret = libxml2mod.xmlUCSIsLatinExtendedB(code)
1906 def uCSIsLetterlikeSymbols(code):
1907 """Check whether the character is part of LetterlikeSymbols
1909 ret = libxml2mod.xmlUCSIsLetterlikeSymbols(code)
1912 def uCSIsLimbu(code):
1913 """Check whether the character is part of Limbu UCS Block """
1914 ret = libxml2mod.xmlUCSIsLimbu(code)
1917 def uCSIsLinearBIdeograms(code):
1918 """Check whether the character is part of LinearBIdeograms UCS
1920 ret = libxml2mod.xmlUCSIsLinearBIdeograms(code)
1923 def uCSIsLinearBSyllabary(code):
1924 """Check whether the character is part of LinearBSyllabary UCS
1926 ret = libxml2mod.xmlUCSIsLinearBSyllabary(code)
1929 def uCSIsLowSurrogates(code):
1930 """Check whether the character is part of LowSurrogates UCS
1932 ret = libxml2mod.xmlUCSIsLowSurrogates(code)
1935 def uCSIsMalayalam(code):
1936 """Check whether the character is part of Malayalam UCS Block """
1937 ret = libxml2mod.xmlUCSIsMalayalam(code)
1940 def uCSIsMathematicalAlphanumericSymbols(code):
1941 """Check whether the character is part of
1942 MathematicalAlphanumericSymbols UCS Block """
1943 ret = libxml2mod.xmlUCSIsMathematicalAlphanumericSymbols(code)
1946 def uCSIsMathematicalOperators(code):
1947 """Check whether the character is part of
1948 MathematicalOperators UCS Block """
1949 ret = libxml2mod.xmlUCSIsMathematicalOperators(code)
1952 def uCSIsMiscellaneousMathematicalSymbolsA(code):
1953 """Check whether the character is part of
1954 MiscellaneousMathematicalSymbols-A UCS Block """
1955 ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsA(code)
1958 def uCSIsMiscellaneousMathematicalSymbolsB(code):
1959 """Check whether the character is part of
1960 MiscellaneousMathematicalSymbols-B UCS Block """
1961 ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsB(code)
1964 def uCSIsMiscellaneousSymbols(code):
1965 """Check whether the character is part of MiscellaneousSymbols
1967 ret = libxml2mod.xmlUCSIsMiscellaneousSymbols(code)
1970 def uCSIsMiscellaneousSymbolsandArrows(code):
1971 """Check whether the character is part of
1972 MiscellaneousSymbolsandArrows UCS Block """
1973 ret = libxml2mod.xmlUCSIsMiscellaneousSymbolsandArrows(code)
1976 def uCSIsMiscellaneousTechnical(code):
1977 """Check whether the character is part of
1978 MiscellaneousTechnical UCS Block """
1979 ret = libxml2mod.xmlUCSIsMiscellaneousTechnical(code)
1982 def uCSIsMongolian(code):
1983 """Check whether the character is part of Mongolian UCS Block """
1984 ret = libxml2mod.xmlUCSIsMongolian(code)
1987 def uCSIsMusicalSymbols(code):
1988 """Check whether the character is part of MusicalSymbols UCS
1990 ret = libxml2mod.xmlUCSIsMusicalSymbols(code)
1993 def uCSIsMyanmar(code):
1994 """Check whether the character is part of Myanmar UCS Block """
1995 ret = libxml2mod.xmlUCSIsMyanmar(code)
1998 def uCSIsNumberForms(code):
1999 """Check whether the character is part of NumberForms UCS Block """
2000 ret = libxml2mod.xmlUCSIsNumberForms(code)
2003 def uCSIsOgham(code):
2004 """Check whether the character is part of Ogham UCS Block """
2005 ret = libxml2mod.xmlUCSIsOgham(code)
2008 def uCSIsOldItalic(code):
2009 """Check whether the character is part of OldItalic UCS Block """
2010 ret = libxml2mod.xmlUCSIsOldItalic(code)
2013 def uCSIsOpticalCharacterRecognition(code):
2014 """Check whether the character is part of
2015 OpticalCharacterRecognition UCS Block """
2016 ret = libxml2mod.xmlUCSIsOpticalCharacterRecognition(code)
2019 def uCSIsOriya(code):
2020 """Check whether the character is part of Oriya UCS Block """
2021 ret = libxml2mod.xmlUCSIsOriya(code)
2024 def uCSIsOsmanya(code):
2025 """Check whether the character is part of Osmanya UCS Block """
2026 ret = libxml2mod.xmlUCSIsOsmanya(code)
2029 def uCSIsPhoneticExtensions(code):
2030 """Check whether the character is part of PhoneticExtensions
2032 ret = libxml2mod.xmlUCSIsPhoneticExtensions(code)
2035 def uCSIsPrivateUse(code):
2036 """Check whether the character is part of PrivateUse UCS Block """
2037 ret = libxml2mod.xmlUCSIsPrivateUse(code)
2040 def uCSIsPrivateUseArea(code):
2041 """Check whether the character is part of PrivateUseArea UCS
2043 ret = libxml2mod.xmlUCSIsPrivateUseArea(code)
2046 def uCSIsRunic(code):
2047 """Check whether the character is part of Runic UCS Block """
2048 ret = libxml2mod.xmlUCSIsRunic(code)
2051 def uCSIsShavian(code):
2052 """Check whether the character is part of Shavian UCS Block """
2053 ret = libxml2mod.xmlUCSIsShavian(code)
2056 def uCSIsSinhala(code):
2057 """Check whether the character is part of Sinhala UCS Block """
2058 ret = libxml2mod.xmlUCSIsSinhala(code)
2061 def uCSIsSmallFormVariants(code):
2062 """Check whether the character is part of SmallFormVariants
2064 ret = libxml2mod.xmlUCSIsSmallFormVariants(code)
2067 def uCSIsSpacingModifierLetters(code):
2068 """Check whether the character is part of
2069 SpacingModifierLetters UCS Block """
2070 ret = libxml2mod.xmlUCSIsSpacingModifierLetters(code)
2073 def uCSIsSpecials(code):
2074 """Check whether the character is part of Specials UCS Block """
2075 ret = libxml2mod.xmlUCSIsSpecials(code)
2078 def uCSIsSuperscriptsandSubscripts(code):
2079 """Check whether the character is part of
2080 SuperscriptsandSubscripts UCS Block """
2081 ret = libxml2mod.xmlUCSIsSuperscriptsandSubscripts(code)
2084 def uCSIsSupplementalArrowsA(code):
2085 """Check whether the character is part of SupplementalArrows-A
2087 ret = libxml2mod.xmlUCSIsSupplementalArrowsA(code)
2090 def uCSIsSupplementalArrowsB(code):
2091 """Check whether the character is part of SupplementalArrows-B
2093 ret = libxml2mod.xmlUCSIsSupplementalArrowsB(code)
2096 def uCSIsSupplementalMathematicalOperators(code):
2097 """Check whether the character is part of
2098 SupplementalMathematicalOperators UCS Block """
2099 ret = libxml2mod.xmlUCSIsSupplementalMathematicalOperators(code)
2102 def uCSIsSupplementaryPrivateUseAreaA(code):
2103 """Check whether the character is part of
2104 SupplementaryPrivateUseArea-A UCS Block """
2105 ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaA(code)
2108 def uCSIsSupplementaryPrivateUseAreaB(code):
2109 """Check whether the character is part of
2110 SupplementaryPrivateUseArea-B UCS Block """
2111 ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaB(code)
2114 def uCSIsSyriac(code):
2115 """Check whether the character is part of Syriac UCS Block """
2116 ret = libxml2mod.xmlUCSIsSyriac(code)
2119 def uCSIsTagalog(code):
2120 """Check whether the character is part of Tagalog UCS Block """
2121 ret = libxml2mod.xmlUCSIsTagalog(code)
2124 def uCSIsTagbanwa(code):
2125 """Check whether the character is part of Tagbanwa UCS Block """
2126 ret = libxml2mod.xmlUCSIsTagbanwa(code)
2129 def uCSIsTags(code):
2130 """Check whether the character is part of Tags UCS Block """
2131 ret = libxml2mod.xmlUCSIsTags(code)
2134 def uCSIsTaiLe(code):
2135 """Check whether the character is part of TaiLe UCS Block """
2136 ret = libxml2mod.xmlUCSIsTaiLe(code)
2139 def uCSIsTaiXuanJingSymbols(code):
2140 """Check whether the character is part of TaiXuanJingSymbols
2142 ret = libxml2mod.xmlUCSIsTaiXuanJingSymbols(code)
2145 def uCSIsTamil(code):
2146 """Check whether the character is part of Tamil UCS Block """
2147 ret = libxml2mod.xmlUCSIsTamil(code)
2150 def uCSIsTelugu(code):
2151 """Check whether the character is part of Telugu UCS Block """
2152 ret = libxml2mod.xmlUCSIsTelugu(code)
2155 def uCSIsThaana(code):
2156 """Check whether the character is part of Thaana UCS Block """
2157 ret = libxml2mod.xmlUCSIsThaana(code)
2160 def uCSIsThai(code):
2161 """Check whether the character is part of Thai UCS Block """
2162 ret = libxml2mod.xmlUCSIsThai(code)
2165 def uCSIsTibetan(code):
2166 """Check whether the character is part of Tibetan UCS Block """
2167 ret = libxml2mod.xmlUCSIsTibetan(code)
2170 def uCSIsUgaritic(code):
2171 """Check whether the character is part of Ugaritic UCS Block """
2172 ret = libxml2mod.xmlUCSIsUgaritic(code)
2175 def uCSIsUnifiedCanadianAboriginalSyllabics(code):
2176 """Check whether the character is part of
2177 UnifiedCanadianAboriginalSyllabics UCS Block """
2178 ret = libxml2mod.xmlUCSIsUnifiedCanadianAboriginalSyllabics(code)
2181 def uCSIsVariationSelectors(code):
2182 """Check whether the character is part of VariationSelectors
2184 ret = libxml2mod.xmlUCSIsVariationSelectors(code)
2187 def uCSIsVariationSelectorsSupplement(code):
2188 """Check whether the character is part of
2189 VariationSelectorsSupplement UCS Block """
2190 ret = libxml2mod.xmlUCSIsVariationSelectorsSupplement(code)
2193 def uCSIsYiRadicals(code):
2194 """Check whether the character is part of YiRadicals UCS Block """
2195 ret = libxml2mod.xmlUCSIsYiRadicals(code)
2198 def uCSIsYiSyllables(code):
2199 """Check whether the character is part of YiSyllables UCS Block """
2200 ret = libxml2mod.xmlUCSIsYiSyllables(code)
2203 def uCSIsYijingHexagramSymbols(code):
2204 """Check whether the character is part of
2205 YijingHexagramSymbols UCS Block """
2206 ret = libxml2mod.xmlUCSIsYijingHexagramSymbols(code)
2210 # Functions from module xmlversion
2213 def checkVersion(version):
2214 """check the compiled lib version against the include one.
2215 This can warn or immediately kill the application """
2216 libxml2mod.xmlCheckVersion(version)
2219 # Functions from module xpathInternals
2223 """Pops the top XPath object from the value stack """
2224 if ctxt is None: ctxt__o = None
2225 else: ctxt__o = ctxt._o
2226 ret = libxml2mod.valuePop(ctxt__o)
2229 class xmlNode(xmlCore):
2230 def __init__(self, _obj=None):
2231 if checkWrapper(_obj) != 0: raise TypeError('xmlNode got a wrong wrapper object type')
2233 xmlCore.__init__(self, _obj=_obj)
2236 return "<xmlNode (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
2238 # accessors for xmlNode
2240 """Get the namespace of a node """
2241 ret = libxml2mod.xmlNodeGetNs(self._o)
2242 if ret is None:return None
2243 __tmp = xmlNs(_obj=ret)
2247 """Get the namespace of a node """
2248 ret = libxml2mod.xmlNodeGetNsDefs(self._o)
2249 if ret is None:return None
2250 __tmp = xmlNs(_obj=ret)
2254 # xmlNode functions from module debugXML
2257 def debugDumpNode(self, output, depth):
2258 """Dumps debug information for the element node, it is
2260 libxml2mod.xmlDebugDumpNode(output, self._o, depth)
2262 def debugDumpNodeList(self, output, depth):
2263 """Dumps debug information for the list of element node, it is
2265 libxml2mod.xmlDebugDumpNodeList(output, self._o, depth)
2267 def debugDumpOneNode(self, output, depth):
2268 """Dumps debug information for the element node, it is not
2270 libxml2mod.xmlDebugDumpOneNode(output, self._o, depth)
2272 def lsCountNode(self):
2273 """Count the children of @node. """
2274 ret = libxml2mod.xmlLsCountNode(self._o)
2277 def lsOneNode(self, output):
2278 """Dump to @output the type and name of @node. """
2279 libxml2mod.xmlLsOneNode(output, self._o)
2281 def shellPrintNode(self):
2282 """Print node to the output FILE """
2283 libxml2mod.xmlShellPrintNode(self._o)
2286 # xmlNode functions from module tree
2289 def addChild(self, cur):
2290 """Add a new node to @parent, at the end of the child (or
2291 property) list merging adjacent TEXT nodes (in which case
2292 @cur is freed) If the new node is ATTRIBUTE, it is added
2293 into properties instead of children. If there is an
2294 attribute with equal name, it is first destroyed. """
2295 if cur is None: cur__o = None
2296 else: cur__o = cur._o
2297 ret = libxml2mod.xmlAddChild(self._o, cur__o)
2298 if ret is None:raise treeError('xmlAddChild() failed')
2299 __tmp = xmlNode(_obj=ret)
2302 def addChildList(self, cur):
2303 """Add a list of node at the end of the child list of the
2304 parent merging adjacent TEXT nodes (@cur may be freed) """
2305 if cur is None: cur__o = None
2306 else: cur__o = cur._o
2307 ret = libxml2mod.xmlAddChildList(self._o, cur__o)
2308 if ret is None:raise treeError('xmlAddChildList() failed')
2309 __tmp = xmlNode(_obj=ret)
2312 def addContent(self, content):
2313 """Append the extra substring to the node content. NOTE: In
2314 contrast to xmlNodeSetContent(), @content is supposed to be
2315 raw text, so unescaped XML special chars are allowed,
2316 entity references are not supported. """
2317 libxml2mod.xmlNodeAddContent(self._o, content)
2319 def addContentLen(self, content, len):
2320 """Append the extra substring to the node content. NOTE: In
2321 contrast to xmlNodeSetContentLen(), @content is supposed to
2322 be raw text, so unescaped XML special chars are allowed,
2323 entity references are not supported. """
2324 libxml2mod.xmlNodeAddContentLen(self._o, content, len)
2326 def addNextSibling(self, elem):
2327 """Add a new node @elem as the next sibling of @cur If the new
2328 node was already inserted in a document it is first
2329 unlinked from its existing context. As a result of text
2330 merging @elem may be freed. If the new node is ATTRIBUTE,
2331 it is added into properties instead of children. If there
2332 is an attribute with equal name, it is first destroyed. """
2333 if elem is None: elem__o = None
2334 else: elem__o = elem._o
2335 ret = libxml2mod.xmlAddNextSibling(self._o, elem__o)
2336 if ret is None:raise treeError('xmlAddNextSibling() failed')
2337 __tmp = xmlNode(_obj=ret)
2340 def addPrevSibling(self, elem):
2341 """Add a new node @elem as the previous sibling of @cur
2342 merging adjacent TEXT nodes (@elem may be freed) If the new
2343 node was already inserted in a document it is first
2344 unlinked from its existing context. If the new node is
2345 ATTRIBUTE, it is added into properties instead of children.
2346 If there is an attribute with equal name, it is first
2348 if elem is None: elem__o = None
2349 else: elem__o = elem._o
2350 ret = libxml2mod.xmlAddPrevSibling(self._o, elem__o)
2351 if ret is None:raise treeError('xmlAddPrevSibling() failed')
2352 __tmp = xmlNode(_obj=ret)
2355 def addSibling(self, elem):
2356 """Add a new element @elem to the list of siblings of @cur
2357 merging adjacent TEXT nodes (@elem may be freed) If the new
2358 element was already inserted in a document it is first
2359 unlinked from its existing context. """
2360 if elem is None: elem__o = None
2361 else: elem__o = elem._o
2362 ret = libxml2mod.xmlAddSibling(self._o, elem__o)
2363 if ret is None:raise treeError('xmlAddSibling() failed')
2364 __tmp = xmlNode(_obj=ret)
2367 def copyNode(self, extended):
2368 """Do a copy of the node. """
2369 ret = libxml2mod.xmlCopyNode(self._o, extended)
2370 if ret is None:raise treeError('xmlCopyNode() failed')
2371 __tmp = xmlNode(_obj=ret)
2374 def copyNodeList(self):
2375 """Do a recursive copy of the node list. Use
2376 xmlDocCopyNodeList() if possible to ensure string interning. """
2377 ret = libxml2mod.xmlCopyNodeList(self._o)
2378 if ret is None:raise treeError('xmlCopyNodeList() failed')
2379 __tmp = xmlNode(_obj=ret)
2382 def copyProp(self, cur):
2383 """Do a copy of the attribute. """
2384 if cur is None: cur__o = None
2385 else: cur__o = cur._o
2386 ret = libxml2mod.xmlCopyProp(self._o, cur__o)
2387 if ret is None:raise treeError('xmlCopyProp() failed')
2388 __tmp = xmlAttr(_obj=ret)
2391 def copyPropList(self, cur):
2392 """Do a copy of an attribute list. """
2393 if cur is None: cur__o = None
2394 else: cur__o = cur._o
2395 ret = libxml2mod.xmlCopyPropList(self._o, cur__o)
2396 if ret is None:raise treeError('xmlCopyPropList() failed')
2397 __tmp = xmlAttr(_obj=ret)
2400 def docCopyNode(self, doc, extended):
2401 """Do a copy of the node to a given document. """
2402 if doc is None: doc__o = None
2403 else: doc__o = doc._o
2404 ret = libxml2mod.xmlDocCopyNode(self._o, doc__o, extended)
2405 if ret is None:raise treeError('xmlDocCopyNode() failed')
2406 __tmp = xmlNode(_obj=ret)
2409 def docCopyNodeList(self, doc):
2410 """Do a recursive copy of the node list. """
2411 if doc is None: doc__o = None
2412 else: doc__o = doc._o
2413 ret = libxml2mod.xmlDocCopyNodeList(doc__o, self._o)
2414 if ret is None:raise treeError('xmlDocCopyNodeList() failed')
2415 __tmp = xmlNode(_obj=ret)
2418 def docSetRootElement(self, doc):
2419 """Set the root element of the document (doc->children is a
2420 list containing possibly comments, PIs, etc ...). """
2421 if doc is None: doc__o = None
2422 else: doc__o = doc._o
2423 ret = libxml2mod.xmlDocSetRootElement(doc__o, self._o)
2424 if ret is None:return None
2425 __tmp = xmlNode(_obj=ret)
2428 def firstElementChild(self):
2429 """Finds the first child node of that element which is a
2430 Element node Note the handling of entities references is
2431 different than in the W3C DOM element traversal spec since
2432 we don't have back reference from entities content to
2433 entities references. """
2434 ret = libxml2mod.xmlFirstElementChild(self._o)
2435 if ret is None:return None
2436 __tmp = xmlNode(_obj=ret)
2440 """Free a node, this is a recursive behaviour, all the
2441 children are freed too. This doesn't unlink the child from
2442 the list, use xmlUnlinkNode() first. """
2443 libxml2mod.xmlFreeNode(self._o)
2445 def freeNodeList(self):
2446 """Free a node and all its siblings, this is a recursive
2447 behaviour, all the children are freed too. """
2448 libxml2mod.xmlFreeNodeList(self._o)
2450 def getBase(self, doc):
2451 """Searches for the BASE URL. The code should work on both XML
2452 and HTML document even if base mechanisms are completely
2453 different. It returns the base as defined in RFC 2396
2454 sections 5.1.1. Base URI within Document Content and 5.1.2.
2455 Base URI from the Encapsulating Entity However it does not
2456 return the document base (5.1.3), use doc->URL in this case """
2457 if doc is None: doc__o = None
2458 else: doc__o = doc._o
2459 ret = libxml2mod.xmlNodeGetBase(doc__o, self._o)
2462 def getContent(self):
2463 """Read the value of a node, this can be either the text
2464 carried directly by this node if it's a TEXT node or the
2465 aggregate string of the values carried by this node child's
2466 (TEXT and ENTITY_REF). Entity references are substituted. """
2467 ret = libxml2mod.xmlNodeGetContent(self._o)
2471 """Searches the language of a node, i.e. the values of the
2472 xml:lang attribute or the one carried by the nearest
2474 ret = libxml2mod.xmlNodeGetLang(self._o)
2477 def getSpacePreserve(self):
2478 """Searches the space preserving behaviour of a node, i.e. the
2479 values of the xml:space attribute or the one carried by the
2480 nearest ancestor. """
2481 ret = libxml2mod.xmlNodeGetSpacePreserve(self._o)
2484 def hasNsProp(self, name, nameSpace):
2485 """Search for an attribute associated to a node This attribute
2486 has to be anchored in the namespace specified. This does
2487 the entity substitution. This function looks in DTD
2488 attribute declaration for #FIXED or default declaration
2489 values unless DTD use has been turned off. Note that a
2490 namespace of None indicates to use the default namespace. """
2491 ret = libxml2mod.xmlHasNsProp(self._o, name, nameSpace)
2492 if ret is None:return None
2493 __tmp = xmlAttr(_obj=ret)
2496 def hasProp(self, name):
2497 """Search an attribute associated to a node This function also
2498 looks in DTD attribute declaration for #FIXED or default
2499 declaration values unless DTD use has been turned off. """
2500 ret = libxml2mod.xmlHasProp(self._o, name)
2501 if ret is None:return None
2502 __tmp = xmlAttr(_obj=ret)
2505 def isBlankNode(self):
2506 """Checks whether this node is an empty or whitespace only
2507 (and possibly ignorable) text-node. """
2508 ret = libxml2mod.xmlIsBlankNode(self._o)
2512 """Is this node a Text node ? """
2513 ret = libxml2mod.xmlNodeIsText(self._o)
2516 def lastChild(self):
2517 """Search the last child of a node. """
2518 ret = libxml2mod.xmlGetLastChild(self._o)
2519 if ret is None:raise treeError('xmlGetLastChild() failed')
2520 __tmp = xmlNode(_obj=ret)
2523 def lastElementChild(self):
2524 """Finds the last child node of that element which is a
2525 Element node Note the handling of entities references is
2526 different than in the W3C DOM element traversal spec since
2527 we don't have back reference from entities content to
2528 entities references. """
2529 ret = libxml2mod.xmlLastElementChild(self._o)
2530 if ret is None:return None
2531 __tmp = xmlNode(_obj=ret)
2535 """Get line number of @node. Try to override the limitation of
2536 lines being store in 16 bits ints if XML_PARSE_BIG_LINES
2537 parser option was used """
2538 ret = libxml2mod.xmlGetLineNo(self._o)
2541 def listGetRawString(self, doc, inLine):
2542 """Builds the string equivalent to the text contained in the
2543 Node list made of TEXTs and ENTITY_REFs, contrary to
2544 xmlNodeListGetString() this function doesn't do any
2545 character encoding handling. """
2546 if doc is None: doc__o = None
2547 else: doc__o = doc._o
2548 ret = libxml2mod.xmlNodeListGetRawString(doc__o, self._o, inLine)
2551 def listGetString(self, doc, inLine):
2552 """Build the string equivalent to the text contained in the
2553 Node list made of TEXTs and ENTITY_REFs """
2554 if doc is None: doc__o = None
2555 else: doc__o = doc._o
2556 ret = libxml2mod.xmlNodeListGetString(doc__o, self._o, inLine)
2559 def newChild(self, ns, name, content):
2560 """Creation of a new child element, added at the end of
2561 @parent children list. @ns and @content parameters are
2562 optional (None). If @ns is None, the newly created element
2563 inherits the namespace of @parent. If @content is non None,
2564 a child list containing the TEXTs and ENTITY_REFs node will
2565 be created. NOTE: @content is supposed to be a piece of XML
2566 CDATA, so it allows entity references. XML special chars
2567 must be escaped first by using
2568 xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
2570 if ns is None: ns__o = None
2572 ret = libxml2mod.xmlNewChild(self._o, ns__o, name, content)
2573 if ret is None:raise treeError('xmlNewChild() failed')
2574 __tmp = xmlNode(_obj=ret)
2577 def newNs(self, href, prefix):
2578 """Creation of a new Namespace. This function will refuse to
2579 create a namespace with a similar prefix than an existing
2580 one present on this node. Note that for a default
2581 namespace, @prefix should be None. We use href==None in
2582 the case of an element creation where the namespace was not
2584 ret = libxml2mod.xmlNewNs(self._o, href, prefix)
2585 if ret is None:raise treeError('xmlNewNs() failed')
2586 __tmp = xmlNs(_obj=ret)
2589 def newNsProp(self, ns, name, value):
2590 """Create a new property tagged with a namespace and carried
2592 if ns is None: ns__o = None
2594 ret = libxml2mod.xmlNewNsProp(self._o, ns__o, name, value)
2595 if ret is None:raise treeError('xmlNewNsProp() failed')
2596 __tmp = xmlAttr(_obj=ret)
2599 def newNsPropEatName(self, ns, name, value):
2600 """Create a new property tagged with a namespace and carried
2602 if ns is None: ns__o = None
2604 ret = libxml2mod.xmlNewNsPropEatName(self._o, ns__o, name, value)
2605 if ret is None:raise treeError('xmlNewNsPropEatName() failed')
2606 __tmp = xmlAttr(_obj=ret)
2609 def newProp(self, name, value):
2610 """Create a new property carried by a node. """
2611 ret = libxml2mod.xmlNewProp(self._o, name, value)
2612 if ret is None:raise treeError('xmlNewProp() failed')
2613 __tmp = xmlAttr(_obj=ret)
2616 def newTextChild(self, ns, name, content):
2617 """Creation of a new child element, added at the end of
2618 @parent children list. @ns and @content parameters are
2619 optional (None). If @ns is None, the newly created element
2620 inherits the namespace of @parent. If @content is non None,
2621 a child TEXT node will be created containing the string
2622 @content. NOTE: Use xmlNewChild() if @content will contain
2623 entities that need to be preserved. Use this function,
2624 xmlNewTextChild(), if you need to ensure that reserved XML
2625 chars that might appear in @content, such as the ampersand,
2626 greater-than or less-than signs, are automatically replaced
2627 by their XML escaped entity representations. """
2628 if ns is None: ns__o = None
2630 ret = libxml2mod.xmlNewTextChild(self._o, ns__o, name, content)
2631 if ret is None:raise treeError('xmlNewTextChild() failed')
2632 __tmp = xmlNode(_obj=ret)
2635 def nextElementSibling(self):
2636 """Finds the first closest next sibling of the node which is
2637 an element node. Note the handling of entities references
2638 is different than in the W3C DOM element traversal spec
2639 since we don't have back reference from entities content to
2640 entities references. """
2641 ret = libxml2mod.xmlNextElementSibling(self._o)
2642 if ret is None:return None
2643 __tmp = xmlNode(_obj=ret)
2646 def noNsProp(self, name):
2647 """Search and get the value of an attribute associated to a
2648 node This does the entity substitution. This function looks
2649 in DTD attribute declaration for #FIXED or default
2650 declaration values unless DTD use has been turned off. This
2651 function is similar to xmlGetProp except it will accept
2652 only an attribute in no namespace. """
2653 ret = libxml2mod.xmlGetNoNsProp(self._o, name)
2657 """Build a structure based Path for the given node """
2658 ret = libxml2mod.xmlGetNodePath(self._o)
2661 def nsProp(self, name, nameSpace):
2662 """Search and get the value of an attribute associated to a
2663 node This attribute has to be anchored in the namespace
2664 specified. This does the entity substitution. This function
2665 looks in DTD attribute declaration for #FIXED or default
2666 declaration values unless DTD use has been turned off. """
2667 ret = libxml2mod.xmlGetNsProp(self._o, name, nameSpace)
2670 def previousElementSibling(self):
2671 """Finds the first closest previous sibling of the node which
2672 is an element node. Note the handling of entities
2673 references is different than in the W3C DOM element
2674 traversal spec since we don't have back reference from
2675 entities content to entities references. """
2676 ret = libxml2mod.xmlPreviousElementSibling(self._o)
2677 if ret is None:return None
2678 __tmp = xmlNode(_obj=ret)
2681 def prop(self, name):
2682 """Search and get the value of an attribute associated to a
2683 node This does the entity substitution. This function looks
2684 in DTD attribute declaration for #FIXED or default
2685 declaration values unless DTD use has been turned off.
2686 NOTE: this function acts independently of namespaces
2687 associated to the attribute. Use xmlGetNsProp() or
2688 xmlGetNoNsProp() for namespace aware processing. """
2689 ret = libxml2mod.xmlGetProp(self._o, name)
2692 def reconciliateNs(self, doc):
2693 """This function checks that all the namespaces declared
2694 within the given tree are properly declared. This is needed
2695 for example after Copy or Cut and then paste operations.
2696 The subtree may still hold pointers to namespace
2697 declarations outside the subtree or invalid/masked. As much
2698 as possible the function try to reuse the existing
2699 namespaces found in the new environment. If not possible
2700 the new namespaces are redeclared on @tree at the top of
2701 the given subtree. """
2702 if doc is None: doc__o = None
2703 else: doc__o = doc._o
2704 ret = libxml2mod.xmlReconciliateNs(doc__o, self._o)
2707 def replaceNode(self, cur):
2708 """Unlink the old node from its current context, prune the new
2709 one at the same place. If @cur was already inserted in a
2710 document it is first unlinked from its existing context. """
2711 if cur is None: cur__o = None
2712 else: cur__o = cur._o
2713 ret = libxml2mod.xmlReplaceNode(self._o, cur__o)
2714 if ret is None:raise treeError('xmlReplaceNode() failed')
2715 __tmp = xmlNode(_obj=ret)
2718 def searchNs(self, doc, nameSpace):
2719 """Search a Ns registered under a given name space for a
2720 document. recurse on the parents until it finds the defined
2721 namespace or return None otherwise. @nameSpace can be None,
2722 this is a search for the default namespace. We don't allow
2723 to cross entities boundaries. If you don't declare the
2724 namespace within those you will be in troubles !!! A
2725 warning is generated to cover this case. """
2726 if doc is None: doc__o = None
2727 else: doc__o = doc._o
2728 ret = libxml2mod.xmlSearchNs(doc__o, self._o, nameSpace)
2729 if ret is None:raise treeError('xmlSearchNs() failed')
2730 __tmp = xmlNs(_obj=ret)
2733 def searchNsByHref(self, doc, href):
2734 """Search a Ns aliasing a given URI. Recurse on the parents
2735 until it finds the defined namespace or return None
2737 if doc is None: doc__o = None
2738 else: doc__o = doc._o
2739 ret = libxml2mod.xmlSearchNsByHref(doc__o, self._o, href)
2740 if ret is None:raise treeError('xmlSearchNsByHref() failed')
2741 __tmp = xmlNs(_obj=ret)
2744 def setBase(self, uri):
2745 """Set (or reset) the base URI of a node, i.e. the value of
2746 the xml:base attribute. """
2747 libxml2mod.xmlNodeSetBase(self._o, uri)
2749 def setContent(self, content):
2750 """Replace the content of a node. NOTE: @content is supposed
2751 to be a piece of XML CDATA, so it allows entity references,
2752 but XML special chars need to be escaped first by using
2753 xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
2754 libxml2mod.xmlNodeSetContent(self._o, content)
2756 def setContentLen(self, content, len):
2757 """Replace the content of a node. NOTE: @content is supposed
2758 to be a piece of XML CDATA, so it allows entity references,
2759 but XML special chars need to be escaped first by using
2760 xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
2761 libxml2mod.xmlNodeSetContentLen(self._o, content, len)
2763 def setLang(self, lang):
2764 """Set the language of a node, i.e. the values of the xml:lang
2766 libxml2mod.xmlNodeSetLang(self._o, lang)
2768 def setListDoc(self, doc):
2769 """update all nodes in the list to point to the right document """
2770 if doc is None: doc__o = None
2771 else: doc__o = doc._o
2772 libxml2mod.xmlSetListDoc(self._o, doc__o)
2774 def setName(self, name):
2775 """Set (or reset) the name of a node. """
2776 libxml2mod.xmlNodeSetName(self._o, name)
2778 def setNs(self, ns):
2779 """Associate a namespace to a node, a posteriori. """
2780 if ns is None: ns__o = None
2782 libxml2mod.xmlSetNs(self._o, ns__o)
2784 def setNsProp(self, ns, name, value):
2785 """Set (or reset) an attribute carried by a node. The ns
2786 structure must be in scope, this is not checked """
2787 if ns is None: ns__o = None
2789 ret = libxml2mod.xmlSetNsProp(self._o, ns__o, name, value)
2790 if ret is None:raise treeError('xmlSetNsProp() failed')
2791 __tmp = xmlAttr(_obj=ret)
2794 def setProp(self, name, value):
2795 """Set (or reset) an attribute carried by a node. If @name has
2796 a prefix, then the corresponding namespace-binding will be
2797 used, if in scope; it is an error it there's no such
2798 ns-binding for the prefix in scope. """
2799 ret = libxml2mod.xmlSetProp(self._o, name, value)
2800 if ret is None:raise treeError('xmlSetProp() failed')
2801 __tmp = xmlAttr(_obj=ret)
2804 def setSpacePreserve(self, val):
2805 """Set (or reset) the space preserving behaviour of a node,
2806 i.e. the value of the xml:space attribute. """
2807 libxml2mod.xmlNodeSetSpacePreserve(self._o, val)
2809 def setTreeDoc(self, doc):
2810 """update all nodes under the tree to point to the right
2812 if doc is None: doc__o = None
2813 else: doc__o = doc._o
2814 libxml2mod.xmlSetTreeDoc(self._o, doc__o)
2816 def textConcat(self, content, len):
2817 """Concat the given string at the end of the existing node
2819 ret = libxml2mod.xmlTextConcat(self._o, content, len)
2822 def textMerge(self, second):
2823 """Merge two text nodes into one """
2824 if second is None: second__o = None
2825 else: second__o = second._o
2826 ret = libxml2mod.xmlTextMerge(self._o, second__o)
2827 if ret is None:raise treeError('xmlTextMerge() failed')
2828 __tmp = xmlNode(_obj=ret)
2831 def unlinkNode(self):
2832 """Unlink a node from it's current context, the node is not
2833 freed If one need to free the node, use xmlFreeNode()
2834 routine after the unlink to discard it. Note that namespace
2835 nodes can't be unlinked as they do not have pointer to
2837 libxml2mod.xmlUnlinkNode(self._o)
2839 def unsetNsProp(self, ns, name):
2840 """Remove an attribute carried by a node. """
2841 if ns is None: ns__o = None
2843 ret = libxml2mod.xmlUnsetNsProp(self._o, ns__o, name)
2846 def unsetProp(self, name):
2847 """Remove an attribute carried by a node. This handles only
2848 attributes in no namespace. """
2849 ret = libxml2mod.xmlUnsetProp(self._o, name)
2853 # xmlNode functions from module valid
2856 def isID(self, doc, attr):
2857 """Determine whether an attribute is of type ID. In case we
2858 have DTD(s) then this is done if DTD loading has been
2859 requested. In the case of HTML documents parsed with the
2860 HTML parser, then ID detection is done systematically. """
2861 if doc is None: doc__o = None
2862 else: doc__o = doc._o
2863 if attr is None: attr__o = None
2864 else: attr__o = attr._o
2865 ret = libxml2mod.xmlIsID(doc__o, self._o, attr__o)
2868 def isRef(self, doc, attr):
2869 """Determine whether an attribute is of type Ref. In case we
2870 have DTD(s) then this is simple, otherwise we use an
2871 heuristic: name Ref (upper or lowercase). """
2872 if doc is None: doc__o = None
2873 else: doc__o = doc._o
2874 if attr is None: attr__o = None
2875 else: attr__o = attr._o
2876 ret = libxml2mod.xmlIsRef(doc__o, self._o, attr__o)
2879 def validNormalizeAttributeValue(self, doc, name, value):
2880 """Does the validation related extra step of the normalization
2881 of attribute values: If the declared value is not CDATA,
2882 then the XML processor must further process the normalized
2883 attribute value by discarding any leading and trailing
2884 space (#x20) characters, and by replacing sequences of
2885 space (#x20) characters by single space (#x20) character. """
2886 if doc is None: doc__o = None
2887 else: doc__o = doc._o
2888 ret = libxml2mod.xmlValidNormalizeAttributeValue(doc__o, self._o, name, value)
2892 # xmlNode functions from module xinclude
2895 def xincludeProcessTree(self):
2896 """Implement the XInclude substitution for the given subtree """
2897 ret = libxml2mod.xmlXIncludeProcessTree(self._o)
2900 def xincludeProcessTreeFlags(self, flags):
2901 """Implement the XInclude substitution for the given subtree """
2902 ret = libxml2mod.xmlXIncludeProcessTreeFlags(self._o, flags)
2906 # xmlNode functions from module xmlschemas
2909 def schemaValidateOneElement(self, ctxt):
2910 """Validate a branch of a tree, starting with the given @elem. """
2911 if ctxt is None: ctxt__o = None
2912 else: ctxt__o = ctxt._o
2913 ret = libxml2mod.xmlSchemaValidateOneElement(ctxt__o, self._o)
2917 # xmlNode functions from module xpath
2920 def xpathCastNodeToNumber(self):
2921 """Converts a node to its number value """
2922 ret = libxml2mod.xmlXPathCastNodeToNumber(self._o)
2925 def xpathCastNodeToString(self):
2926 """Converts a node to its string value. """
2927 ret = libxml2mod.xmlXPathCastNodeToString(self._o)
2930 def xpathCmpNodes(self, node2):
2931 """Compare two nodes w.r.t document order """
2932 if node2 is None: node2__o = None
2933 else: node2__o = node2._o
2934 ret = libxml2mod.xmlXPathCmpNodes(self._o, node2__o)
2937 def xpathNodeEval(self, str, ctx):
2938 """Evaluate the XPath Location Path in the given context. The
2939 node 'node' is set as the context node. The context node is
2941 if ctx is None: ctx__o = None
2942 else: ctx__o = ctx._o
2943 ret = libxml2mod.xmlXPathNodeEval(self._o, str, ctx__o)
2944 if ret is None:raise xpathError('xmlXPathNodeEval() failed')
2945 return xpathObjectRet(ret)
2948 # xmlNode functions from module xpathInternals
2951 def xpathNewNodeSet(self):
2952 """Create a new xmlXPathObjectPtr of type NodeSet and
2953 initialize it with the single Node @val """
2954 ret = libxml2mod.xmlXPathNewNodeSet(self._o)
2955 if ret is None:raise xpathError('xmlXPathNewNodeSet() failed')
2956 return xpathObjectRet(ret)
2958 def xpathNewValueTree(self):
2959 """Create a new xmlXPathObjectPtr of type Value Tree (XSLT)
2960 and initialize it with the tree root @val """
2961 ret = libxml2mod.xmlXPathNewValueTree(self._o)
2962 if ret is None:raise xpathError('xmlXPathNewValueTree() failed')
2963 return xpathObjectRet(ret)
2965 def xpathNextAncestor(self, ctxt):
2966 """Traversal function for the "ancestor" direction the
2967 ancestor axis contains the ancestors of the context node;
2968 the ancestors of the context node consist of the parent of
2969 context node and the parent's parent and so on; the nodes
2970 are ordered in reverse document order; thus the parent is
2971 the first node on the axis, and the parent's parent is the
2972 second node on the axis """
2973 if ctxt is None: ctxt__o = None
2974 else: ctxt__o = ctxt._o
2975 ret = libxml2mod.xmlXPathNextAncestor(ctxt__o, self._o)
2976 if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
2977 __tmp = xmlNode(_obj=ret)
2980 def xpathNextAncestorOrSelf(self, ctxt):
2981 """Traversal function for the "ancestor-or-self" direction he
2982 ancestor-or-self axis contains the context node and
2983 ancestors of the context node in reverse document order;
2984 thus the context node is the first node on the axis, and
2985 the context node's parent the second; parent here is
2986 defined the same as with the parent axis. """
2987 if ctxt is None: ctxt__o = None
2988 else: ctxt__o = ctxt._o
2989 ret = libxml2mod.xmlXPathNextAncestorOrSelf(ctxt__o, self._o)
2990 if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
2991 __tmp = xmlNode(_obj=ret)
2994 def xpathNextAttribute(self, ctxt):
2995 """Traversal function for the "attribute" direction TODO:
2996 support DTD inherited default attributes """
2997 if ctxt is None: ctxt__o = None
2998 else: ctxt__o = ctxt._o
2999 ret = libxml2mod.xmlXPathNextAttribute(ctxt__o, self._o)
3000 if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
3001 __tmp = xmlNode(_obj=ret)
3004 def xpathNextChild(self, ctxt):
3005 """Traversal function for the "child" direction The child axis
3006 contains the children of the context node in document order. """
3007 if ctxt is None: ctxt__o = None
3008 else: ctxt__o = ctxt._o
3009 ret = libxml2mod.xmlXPathNextChild(ctxt__o, self._o)
3010 if ret is None:raise xpathError('xmlXPathNextChild() failed')
3011 __tmp = xmlNode(_obj=ret)
3014 def xpathNextDescendant(self, ctxt):
3015 """Traversal function for the "descendant" direction the
3016 descendant axis contains the descendants of the context
3017 node in document order; a descendant is a child or a child
3018 of a child and so on. """
3019 if ctxt is None: ctxt__o = None
3020 else: ctxt__o = ctxt._o
3021 ret = libxml2mod.xmlXPathNextDescendant(ctxt__o, self._o)
3022 if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
3023 __tmp = xmlNode(_obj=ret)
3026 def xpathNextDescendantOrSelf(self, ctxt):
3027 """Traversal function for the "descendant-or-self" direction
3028 the descendant-or-self axis contains the context node and
3029 the descendants of the context node in document order; thus
3030 the context node is the first node on the axis, and the
3031 first child of the context node is the second node on the
3033 if ctxt is None: ctxt__o = None
3034 else: ctxt__o = ctxt._o
3035 ret = libxml2mod.xmlXPathNextDescendantOrSelf(ctxt__o, self._o)
3036 if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
3037 __tmp = xmlNode(_obj=ret)
3040 def xpathNextFollowing(self, ctxt):
3041 """Traversal function for the "following" direction The
3042 following axis contains all nodes in the same document as
3043 the context node that are after the context node in
3044 document order, excluding any descendants and excluding
3045 attribute nodes and namespace nodes; the nodes are ordered
3046 in document order """
3047 if ctxt is None: ctxt__o = None
3048 else: ctxt__o = ctxt._o
3049 ret = libxml2mod.xmlXPathNextFollowing(ctxt__o, self._o)
3050 if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
3051 __tmp = xmlNode(_obj=ret)
3054 def xpathNextFollowingSibling(self, ctxt):
3055 """Traversal function for the "following-sibling" direction
3056 The following-sibling axis contains the following siblings
3057 of the context node in document order. """
3058 if ctxt is None: ctxt__o = None
3059 else: ctxt__o = ctxt._o
3060 ret = libxml2mod.xmlXPathNextFollowingSibling(ctxt__o, self._o)
3061 if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
3062 __tmp = xmlNode(_obj=ret)
3065 def xpathNextNamespace(self, ctxt):
3066 """Traversal function for the "namespace" direction the
3067 namespace axis contains the namespace nodes of the context
3068 node; the order of nodes on this axis is
3069 implementation-defined; the axis will be empty unless the
3070 context node is an element We keep the XML namespace node
3071 at the end of the list. """
3072 if ctxt is None: ctxt__o = None
3073 else: ctxt__o = ctxt._o
3074 ret = libxml2mod.xmlXPathNextNamespace(ctxt__o, self._o)
3075 if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
3076 __tmp = xmlNode(_obj=ret)
3079 def xpathNextParent(self, ctxt):
3080 """Traversal function for the "parent" direction The parent
3081 axis contains the parent of the context node, if there is
3083 if ctxt is None: ctxt__o = None
3084 else: ctxt__o = ctxt._o
3085 ret = libxml2mod.xmlXPathNextParent(ctxt__o, self._o)
3086 if ret is None:raise xpathError('xmlXPathNextParent() failed')
3087 __tmp = xmlNode(_obj=ret)
3090 def xpathNextPreceding(self, ctxt):
3091 """Traversal function for the "preceding" direction the
3092 preceding axis contains all nodes in the same document as
3093 the context node that are before the context node in
3094 document order, excluding any ancestors and excluding
3095 attribute nodes and namespace nodes; the nodes are ordered
3096 in reverse document order """
3097 if ctxt is None: ctxt__o = None
3098 else: ctxt__o = ctxt._o
3099 ret = libxml2mod.xmlXPathNextPreceding(ctxt__o, self._o)
3100 if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
3101 __tmp = xmlNode(_obj=ret)
3104 def xpathNextPrecedingSibling(self, ctxt):
3105 """Traversal function for the "preceding-sibling" direction
3106 The preceding-sibling axis contains the preceding siblings
3107 of the context node in reverse document order; the first
3108 preceding sibling is first on the axis; the sibling
3109 preceding that node is the second on the axis and so on. """
3110 if ctxt is None: ctxt__o = None
3111 else: ctxt__o = ctxt._o
3112 ret = libxml2mod.xmlXPathNextPrecedingSibling(ctxt__o, self._o)
3113 if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
3114 __tmp = xmlNode(_obj=ret)
3117 def xpathNextSelf(self, ctxt):
3118 """Traversal function for the "self" direction The self axis
3119 contains just the context node itself """
3120 if ctxt is None: ctxt__o = None
3121 else: ctxt__o = ctxt._o
3122 ret = libxml2mod.xmlXPathNextSelf(ctxt__o, self._o)
3123 if ret is None:raise xpathError('xmlXPathNextSelf() failed')
3124 __tmp = xmlNode(_obj=ret)
3128 # xmlNode functions from module xpointer
3131 def xpointerNewCollapsedRange(self):
3132 """Create a new xmlXPathObjectPtr of type range using a single
3134 ret = libxml2mod.xmlXPtrNewCollapsedRange(self._o)
3135 if ret is None:raise treeError('xmlXPtrNewCollapsedRange() failed')
3136 return xpathObjectRet(ret)
3138 def xpointerNewContext(self, doc, origin):
3139 """Create a new XPointer context """
3140 if doc is None: doc__o = None
3141 else: doc__o = doc._o
3142 if origin is None: origin__o = None
3143 else: origin__o = origin._o
3144 ret = libxml2mod.xmlXPtrNewContext(doc__o, self._o, origin__o)
3145 if ret is None:raise treeError('xmlXPtrNewContext() failed')
3146 __tmp = xpathContext(_obj=ret)
3149 def xpointerNewLocationSetNodes(self, end):
3150 """Create a new xmlXPathObjectPtr of type LocationSet and
3151 initialize it with the single range made of the two nodes
3153 if end is None: end__o = None
3154 else: end__o = end._o
3155 ret = libxml2mod.xmlXPtrNewLocationSetNodes(self._o, end__o)
3156 if ret is None:raise treeError('xmlXPtrNewLocationSetNodes() failed')
3157 return xpathObjectRet(ret)
3159 def xpointerNewRange(self, startindex, end, endindex):
3160 """Create a new xmlXPathObjectPtr of type range """
3161 if end is None: end__o = None
3162 else: end__o = end._o
3163 ret = libxml2mod.xmlXPtrNewRange(self._o, startindex, end__o, endindex)
3164 if ret is None:raise treeError('xmlXPtrNewRange() failed')
3165 return xpathObjectRet(ret)
3167 def xpointerNewRangeNodes(self, end):
3168 """Create a new xmlXPathObjectPtr of type range using 2 nodes """
3169 if end is None: end__o = None
3170 else: end__o = end._o
3171 ret = libxml2mod.xmlXPtrNewRangeNodes(self._o, end__o)
3172 if ret is None:raise treeError('xmlXPtrNewRangeNodes() failed')
3173 return xpathObjectRet(ret)
3175 class xmlDoc(xmlNode):
3176 def __init__(self, _obj=None):
3177 if checkWrapper(_obj) != 0: raise TypeError('xmlDoc got a wrong wrapper object type')
3179 xmlNode.__init__(self, _obj=_obj)
3182 return "<xmlDoc (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
3185 # xmlDoc functions from module HTMLparser
3188 def htmlAutoCloseTag(self, name, elem):
3189 """The HTML DTD allows a tag to implicitly close other tags.
3190 The list is kept in htmlStartClose array. This function
3191 checks if the element or one of it's children would
3192 autoclose the given tag. """
3193 ret = libxml2mod.htmlAutoCloseTag(self._o, name, elem)
3196 def htmlIsAutoClosed(self, elem):
3197 """The HTML DTD allows a tag to implicitly close other tags.
3198 The list is kept in htmlStartClose array. This function
3199 checks if a tag is autoclosed by one of it's child """
3200 ret = libxml2mod.htmlIsAutoClosed(self._o, elem)
3204 # xmlDoc functions from module HTMLtree
3207 def htmlDocContentDumpFormatOutput(self, buf, encoding, format):
3208 """Dump an HTML document. """
3209 if buf is None: buf__o = None
3210 else: buf__o = buf._o
3211 libxml2mod.htmlDocContentDumpFormatOutput(buf__o, self._o, encoding, format)
3213 def htmlDocContentDumpOutput(self, buf, encoding):
3214 """Dump an HTML document. Formating return/spaces are added. """
3215 if buf is None: buf__o = None
3216 else: buf__o = buf._o
3217 libxml2mod.htmlDocContentDumpOutput(buf__o, self._o, encoding)
3219 def htmlDocDump(self, f):
3220 """Dump an HTML document to an open FILE. """
3221 ret = libxml2mod.htmlDocDump(f, self._o)
3224 def htmlGetMetaEncoding(self):
3225 """Encoding definition lookup in the Meta tags """
3226 ret = libxml2mod.htmlGetMetaEncoding(self._o)
3229 def htmlNodeDumpFile(self, out, cur):
3230 """Dump an HTML node, recursive behaviour,children are printed
3231 too, and formatting returns are added. """
3232 if cur is None: cur__o = None
3233 else: cur__o = cur._o
3234 libxml2mod.htmlNodeDumpFile(out, self._o, cur__o)
3236 def htmlNodeDumpFileFormat(self, out, cur, encoding, format):
3237 """Dump an HTML node, recursive behaviour,children are printed
3238 too. TODO: if encoding == None try to save in the doc
3240 if cur is None: cur__o = None
3241 else: cur__o = cur._o
3242 ret = libxml2mod.htmlNodeDumpFileFormat(out, self._o, cur__o, encoding, format)
3245 def htmlNodeDumpFormatOutput(self, buf, cur, encoding, format):
3246 """Dump an HTML node, recursive behaviour,children are printed
3248 if buf is None: buf__o = None
3249 else: buf__o = buf._o
3250 if cur is None: cur__o = None
3251 else: cur__o = cur._o
3252 libxml2mod.htmlNodeDumpFormatOutput(buf__o, self._o, cur__o, encoding, format)
3254 def htmlNodeDumpOutput(self, buf, cur, encoding):
3255 """Dump an HTML node, recursive behaviour,children are printed
3256 too, and formatting returns/spaces are added. """
3257 if buf is None: buf__o = None
3258 else: buf__o = buf._o
3259 if cur is None: cur__o = None
3260 else: cur__o = cur._o
3261 libxml2mod.htmlNodeDumpOutput(buf__o, self._o, cur__o, encoding)
3263 def htmlSaveFile(self, filename):
3264 """Dump an HTML document to a file. If @filename is "-" the
3265 stdout file is used. """
3266 ret = libxml2mod.htmlSaveFile(filename, self._o)
3269 def htmlSaveFileEnc(self, filename, encoding):
3270 """Dump an HTML document to a file using a given encoding and
3271 formatting returns/spaces are added. """
3272 ret = libxml2mod.htmlSaveFileEnc(filename, self._o, encoding)
3275 def htmlSaveFileFormat(self, filename, encoding, format):
3276 """Dump an HTML document to a file using a given encoding. """
3277 ret = libxml2mod.htmlSaveFileFormat(filename, self._o, encoding, format)
3280 def htmlSetMetaEncoding(self, encoding):
3281 """Sets the current encoding in the Meta tags NOTE: this will
3282 not change the document content encoding, just the META
3283 flag associated. """
3284 ret = libxml2mod.htmlSetMetaEncoding(self._o, encoding)
3288 # xmlDoc functions from module debugXML
3291 def debugCheckDocument(self, output):
3292 """Check the document for potential content problems, and
3293 output the errors to @output """
3294 ret = libxml2mod.xmlDebugCheckDocument(output, self._o)
3297 def debugDumpDocument(self, output):
3298 """Dumps debug information for the document, it's recursive """
3299 libxml2mod.xmlDebugDumpDocument(output, self._o)
3301 def debugDumpDocumentHead(self, output):
3302 """Dumps debug information cncerning the document, not
3304 libxml2mod.xmlDebugDumpDocumentHead(output, self._o)
3306 def debugDumpEntities(self, output):
3307 """Dumps debug information for all the entities in use by the
3309 libxml2mod.xmlDebugDumpEntities(output, self._o)
3312 # xmlDoc functions from module entities
3315 def addDocEntity(self, name, type, ExternalID, SystemID, content):
3316 """Register a new entity for this document. """
3317 ret = libxml2mod.xmlAddDocEntity(self._o, name, type, ExternalID, SystemID, content)
3318 if ret is None:raise treeError('xmlAddDocEntity() failed')
3319 __tmp = xmlEntity(_obj=ret)
3322 def addDtdEntity(self, name, type, ExternalID, SystemID, content):
3323 """Register a new entity for this document DTD external subset. """
3324 ret = libxml2mod.xmlAddDtdEntity(self._o, name, type, ExternalID, SystemID, content)
3325 if ret is None:raise treeError('xmlAddDtdEntity() failed')
3326 __tmp = xmlEntity(_obj=ret)
3329 def docEntity(self, name):
3330 """Do an entity lookup in the document entity hash table and """
3331 ret = libxml2mod.xmlGetDocEntity(self._o, name)
3332 if ret is None:raise treeError('xmlGetDocEntity() failed')
3333 __tmp = xmlEntity(_obj=ret)
3336 def dtdEntity(self, name):
3337 """Do an entity lookup in the DTD entity hash table and """
3338 ret = libxml2mod.xmlGetDtdEntity(self._o, name)
3339 if ret is None:raise treeError('xmlGetDtdEntity() failed')
3340 __tmp = xmlEntity(_obj=ret)
3343 def encodeEntities(self, input):
3344 """TODO: remove xmlEncodeEntities, once we are not afraid of
3345 breaking binary compatibility People must migrate their
3346 code to xmlEncodeEntitiesReentrant ! This routine will
3347 issue a warning when encountered. """
3348 ret = libxml2mod.xmlEncodeEntities(self._o, input)
3351 def encodeEntitiesReentrant(self, input):
3352 """Do a global encoding of a string, replacing the predefined
3353 entities and non ASCII values with their entities and
3354 CharRef counterparts. Contrary to xmlEncodeEntities, this
3355 routine is reentrant, and result must be deallocated. """
3356 ret = libxml2mod.xmlEncodeEntitiesReentrant(self._o, input)
3359 def encodeSpecialChars(self, input):
3360 """Do a global encoding of a string, replacing the predefined
3361 entities this routine is reentrant, and result must be
3363 ret = libxml2mod.xmlEncodeSpecialChars(self._o, input)
3366 def newEntity(self, name, type, ExternalID, SystemID, content):
3367 """Create a new entity, this differs from xmlAddDocEntity()
3368 that if the document is None or has no internal subset
3369 defined, then an unlinked entity structure will be
3370 returned, it is then the responsability of the caller to
3371 link it to the document later or free it when not needed
3373 ret = libxml2mod.xmlNewEntity(self._o, name, type, ExternalID, SystemID, content)
3374 if ret is None:raise treeError('xmlNewEntity() failed')
3375 __tmp = xmlEntity(_obj=ret)
3378 def parameterEntity(self, name):
3379 """Do an entity lookup in the internal and external subsets and """
3380 ret = libxml2mod.xmlGetParameterEntity(self._o, name)
3381 if ret is None:raise treeError('xmlGetParameterEntity() failed')
3382 __tmp = xmlEntity(_obj=ret)
3386 # xmlDoc functions from module relaxng
3389 def relaxNGNewDocParserCtxt(self):
3390 """Create an XML RelaxNGs parser context for that document.
3391 Note: since the process of compiling a RelaxNG schemas
3392 modifies the document, the @doc parameter is duplicated
3394 ret = libxml2mod.xmlRelaxNGNewDocParserCtxt(self._o)
3395 if ret is None:raise parserError('xmlRelaxNGNewDocParserCtxt() failed')
3396 __tmp = relaxNgParserCtxt(_obj=ret)
3399 def relaxNGValidateDoc(self, ctxt):
3400 """Validate a document tree in memory. """
3401 if ctxt is None: ctxt__o = None
3402 else: ctxt__o = ctxt._o
3403 ret = libxml2mod.xmlRelaxNGValidateDoc(ctxt__o, self._o)
3406 def relaxNGValidateFullElement(self, ctxt, elem):
3407 """Validate a full subtree when
3408 xmlRelaxNGValidatePushElement() returned 0 and the content
3409 of the node has been expanded. """
3410 if ctxt is None: ctxt__o = None
3411 else: ctxt__o = ctxt._o
3412 if elem is None: elem__o = None
3413 else: elem__o = elem._o
3414 ret = libxml2mod.xmlRelaxNGValidateFullElement(ctxt__o, self._o, elem__o)
3417 def relaxNGValidatePopElement(self, ctxt, elem):
3418 """Pop the element end from the RelaxNG validation stack. """
3419 if ctxt is None: ctxt__o = None
3420 else: ctxt__o = ctxt._o
3421 if elem is None: elem__o = None
3422 else: elem__o = elem._o
3423 ret = libxml2mod.xmlRelaxNGValidatePopElement(ctxt__o, self._o, elem__o)
3426 def relaxNGValidatePushElement(self, ctxt, elem):
3427 """Push a new element start on the RelaxNG validation stack. """
3428 if ctxt is None: ctxt__o = None
3429 else: ctxt__o = ctxt._o
3430 if elem is None: elem__o = None
3431 else: elem__o = elem._o
3432 ret = libxml2mod.xmlRelaxNGValidatePushElement(ctxt__o, self._o, elem__o)
3436 # xmlDoc functions from module tree
3439 def copyDoc(self, recursive):
3440 """Do a copy of the document info. If recursive, the content
3441 tree will be copied too as well as DTD, namespaces and
3443 ret = libxml2mod.xmlCopyDoc(self._o, recursive)
3444 if ret is None:raise treeError('xmlCopyDoc() failed')
3445 __tmp = xmlDoc(_obj=ret)
3448 def copyNode(self, node, extended):
3449 """Do a copy of the node to a given document. """
3450 if node is None: node__o = None
3451 else: node__o = node._o
3452 ret = libxml2mod.xmlDocCopyNode(node__o, self._o, extended)
3453 if ret is None:raise treeError('xmlDocCopyNode() failed')
3454 __tmp = xmlNode(_obj=ret)
3457 def copyNodeList(self, node):
3458 """Do a recursive copy of the node list. """
3459 if node is None: node__o = None
3460 else: node__o = node._o
3461 ret = libxml2mod.xmlDocCopyNodeList(self._o, node__o)
3462 if ret is None:raise treeError('xmlDocCopyNodeList() failed')
3463 __tmp = xmlNode(_obj=ret)
3466 def createIntSubset(self, name, ExternalID, SystemID):
3467 """Create the internal subset of a document """
3468 ret = libxml2mod.xmlCreateIntSubset(self._o, name, ExternalID, SystemID)
3469 if ret is None:raise treeError('xmlCreateIntSubset() failed')
3470 __tmp = xmlDtd(_obj=ret)
3473 def docCompressMode(self):
3474 """get the compression ratio for a document, ZLIB based """
3475 ret = libxml2mod.xmlGetDocCompressMode(self._o)
3479 """Dump an XML document to an open FILE. """
3480 ret = libxml2mod.xmlDocDump(f, self._o)
3483 def elemDump(self, f, cur):
3484 """Dump an XML/HTML node, recursive behaviour, children are
3486 if cur is None: cur__o = None
3487 else: cur__o = cur._o
3488 libxml2mod.xmlElemDump(f, self._o, cur__o)
3490 def formatDump(self, f, format):
3491 """Dump an XML document to an open FILE. """
3492 ret = libxml2mod.xmlDocFormatDump(f, self._o, format)
3496 """Free up all the structures used by a document, tree
3498 libxml2mod.xmlFreeDoc(self._o)
3500 def getRootElement(self):
3501 """Get the root element of the document (doc->children is a
3502 list containing possibly comments, PIs, etc ...). """
3503 ret = libxml2mod.xmlDocGetRootElement(self._o)
3504 if ret is None:raise treeError('xmlDocGetRootElement() failed')
3505 __tmp = xmlNode(_obj=ret)
3508 def intSubset(self):
3509 """Get the internal subset of a document """
3510 ret = libxml2mod.xmlGetIntSubset(self._o)
3511 if ret is None:raise treeError('xmlGetIntSubset() failed')
3512 __tmp = xmlDtd(_obj=ret)
3515 def newCDataBlock(self, content, len):
3516 """Creation of a new node containing a CDATA block. """
3517 ret = libxml2mod.xmlNewCDataBlock(self._o, content, len)
3518 if ret is None:raise treeError('xmlNewCDataBlock() failed')
3519 __tmp = xmlNode(_obj=ret)
3522 def newCharRef(self, name):
3523 """Creation of a new character reference node. """
3524 ret = libxml2mod.xmlNewCharRef(self._o, name)
3525 if ret is None:raise treeError('xmlNewCharRef() failed')
3526 __tmp = xmlNode(_obj=ret)
3529 def newDocComment(self, content):
3530 """Creation of a new node containing a comment within a
3532 ret = libxml2mod.xmlNewDocComment(self._o, content)
3533 if ret is None:raise treeError('xmlNewDocComment() failed')
3534 __tmp = xmlNode(_obj=ret)
3537 def newDocFragment(self):
3538 """Creation of a new Fragment node. """
3539 ret = libxml2mod.xmlNewDocFragment(self._o)
3540 if ret is None:raise treeError('xmlNewDocFragment() failed')
3541 __tmp = xmlNode(_obj=ret)
3544 def newDocNode(self, ns, name, content):
3545 """Creation of a new node element within a document. @ns and
3546 @content are optional (None). NOTE: @content is supposed to
3547 be a piece of XML CDATA, so it allow entities references,
3548 but XML special chars need to be escaped first by using
3549 xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
3550 don't need entities support. """
3551 if ns is None: ns__o = None
3553 ret = libxml2mod.xmlNewDocNode(self._o, ns__o, name, content)
3554 if ret is None:raise treeError('xmlNewDocNode() failed')
3555 __tmp = xmlNode(_obj=ret)
3558 def newDocNodeEatName(self, ns, name, content):
3559 """Creation of a new node element within a document. @ns and
3560 @content are optional (None). NOTE: @content is supposed to
3561 be a piece of XML CDATA, so it allow entities references,
3562 but XML special chars need to be escaped first by using
3563 xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
3564 don't need entities support. """
3565 if ns is None: ns__o = None
3567 ret = libxml2mod.xmlNewDocNodeEatName(self._o, ns__o, name, content)
3568 if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
3569 __tmp = xmlNode(_obj=ret)
3572 def newDocPI(self, name, content):
3573 """Creation of a processing instruction element. """
3574 ret = libxml2mod.xmlNewDocPI(self._o, name, content)
3575 if ret is None:raise treeError('xmlNewDocPI() failed')
3576 __tmp = xmlNode(_obj=ret)
3579 def newDocProp(self, name, value):
3580 """Create a new property carried by a document. """
3581 ret = libxml2mod.xmlNewDocProp(self._o, name, value)
3582 if ret is None:raise treeError('xmlNewDocProp() failed')
3583 __tmp = xmlAttr(_obj=ret)
3586 def newDocRawNode(self, ns, name, content):
3587 """Creation of a new node element within a document. @ns and
3588 @content are optional (None). """
3589 if ns is None: ns__o = None
3591 ret = libxml2mod.xmlNewDocRawNode(self._o, ns__o, name, content)
3592 if ret is None:raise treeError('xmlNewDocRawNode() failed')
3593 __tmp = xmlNode(_obj=ret)
3596 def newDocText(self, content):
3597 """Creation of a new text node within a document. """
3598 ret = libxml2mod.xmlNewDocText(self._o, content)
3599 if ret is None:raise treeError('xmlNewDocText() failed')
3600 __tmp = xmlNode(_obj=ret)
3603 def newDocTextLen(self, content, len):
3604 """Creation of a new text node with an extra content length
3605 parameter. The text node pertain to a given document. """
3606 ret = libxml2mod.xmlNewDocTextLen(self._o, content, len)
3607 if ret is None:raise treeError('xmlNewDocTextLen() failed')
3608 __tmp = xmlNode(_obj=ret)
3611 def newDtd(self, name, ExternalID, SystemID):
3612 """Creation of a new DTD for the external subset. To create an
3613 internal subset, use xmlCreateIntSubset(). """
3614 ret = libxml2mod.xmlNewDtd(self._o, name, ExternalID, SystemID)
3615 if ret is None:raise treeError('xmlNewDtd() failed')
3616 __tmp = xmlDtd(_obj=ret)
3619 def newGlobalNs(self, href, prefix):
3620 """Creation of a Namespace, the old way using PI and without
3621 scoping DEPRECATED !!! """
3622 ret = libxml2mod.xmlNewGlobalNs(self._o, href, prefix)
3623 if ret is None:raise treeError('xmlNewGlobalNs() failed')
3624 __tmp = xmlNs(_obj=ret)
3627 def newReference(self, name):
3628 """Creation of a new reference node. """
3629 ret = libxml2mod.xmlNewReference(self._o, name)
3630 if ret is None:raise treeError('xmlNewReference() failed')
3631 __tmp = xmlNode(_obj=ret)
3634 def nodeDumpOutput(self, buf, cur, level, format, encoding):
3635 """Dump an XML node, recursive behaviour, children are printed
3636 too. Note that @format = 1 provide node indenting only if
3637 xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
3639 if buf is None: buf__o = None
3640 else: buf__o = buf._o
3641 if cur is None: cur__o = None
3642 else: cur__o = cur._o
3643 libxml2mod.xmlNodeDumpOutput(buf__o, self._o, cur__o, level, format, encoding)
3645 def nodeGetBase(self, cur):
3646 """Searches for the BASE URL. The code should work on both XML
3647 and HTML document even if base mechanisms are completely
3648 different. It returns the base as defined in RFC 2396
3649 sections 5.1.1. Base URI within Document Content and 5.1.2.
3650 Base URI from the Encapsulating Entity However it does not
3651 return the document base (5.1.3), use doc->URL in this case """
3652 if cur is None: cur__o = None
3653 else: cur__o = cur._o
3654 ret = libxml2mod.xmlNodeGetBase(self._o, cur__o)
3657 def nodeListGetRawString(self, list, inLine):
3658 """Builds the string equivalent to the text contained in the
3659 Node list made of TEXTs and ENTITY_REFs, contrary to
3660 xmlNodeListGetString() this function doesn't do any
3661 character encoding handling. """
3662 if list is None: list__o = None
3663 else: list__o = list._o
3664 ret = libxml2mod.xmlNodeListGetRawString(self._o, list__o, inLine)
3667 def nodeListGetString(self, list, inLine):
3668 """Build the string equivalent to the text contained in the
3669 Node list made of TEXTs and ENTITY_REFs """
3670 if list is None: list__o = None
3671 else: list__o = list._o
3672 ret = libxml2mod.xmlNodeListGetString(self._o, list__o, inLine)
3675 def reconciliateNs(self, tree):
3676 """This function checks that all the namespaces declared
3677 within the given tree are properly declared. This is needed
3678 for example after Copy or Cut and then paste operations.
3679 The subtree may still hold pointers to namespace
3680 declarations outside the subtree or invalid/masked. As much
3681 as possible the function try to reuse the existing
3682 namespaces found in the new environment. If not possible
3683 the new namespaces are redeclared on @tree at the top of
3684 the given subtree. """
3685 if tree is None: tree__o = None
3686 else: tree__o = tree._o
3687 ret = libxml2mod.xmlReconciliateNs(self._o, tree__o)
3690 def saveFile(self, filename):
3691 """Dump an XML document to a file. Will use compression if
3692 compiled in and enabled. If @filename is "-" the stdout
3694 ret = libxml2mod.xmlSaveFile(filename, self._o)
3697 def saveFileEnc(self, filename, encoding):
3698 """Dump an XML document, converting it to the given encoding """
3699 ret = libxml2mod.xmlSaveFileEnc(filename, self._o, encoding)
3702 def saveFileTo(self, buf, encoding):
3703 """Dump an XML document to an I/O buffer. Warning ! This call
3704 xmlOutputBufferClose() on buf which is not available after
3706 if buf is None: buf__o = None
3707 else: buf__o = buf._o
3708 ret = libxml2mod.xmlSaveFileTo(buf__o, self._o, encoding)
3711 def saveFormatFile(self, filename, format):
3712 """Dump an XML document to a file. Will use compression if
3713 compiled in and enabled. If @filename is "-" the stdout
3714 file is used. If @format is set then the document will be
3715 indented on output. Note that @format = 1 provide node
3716 indenting only if xmlIndentTreeOutput = 1 or
3717 xmlKeepBlanksDefault(0) was called """
3718 ret = libxml2mod.xmlSaveFormatFile(filename, self._o, format)
3721 def saveFormatFileEnc(self, filename, encoding, format):
3722 """Dump an XML document to a file or an URL. """
3723 ret = libxml2mod.xmlSaveFormatFileEnc(filename, self._o, encoding, format)
3726 def saveFormatFileTo(self, buf, encoding, format):
3727 """Dump an XML document to an I/O buffer. Warning ! This call
3728 xmlOutputBufferClose() on buf which is not available after
3730 if buf is None: buf__o = None
3731 else: buf__o = buf._o
3732 ret = libxml2mod.xmlSaveFormatFileTo(buf__o, self._o, encoding, format)
3735 def searchNs(self, node, nameSpace):
3736 """Search a Ns registered under a given name space for a
3737 document. recurse on the parents until it finds the defined
3738 namespace or return None otherwise. @nameSpace can be None,
3739 this is a search for the default namespace. We don't allow
3740 to cross entities boundaries. If you don't declare the
3741 namespace within those you will be in troubles !!! A
3742 warning is generated to cover this case. """
3743 if node is None: node__o = None
3744 else: node__o = node._o
3745 ret = libxml2mod.xmlSearchNs(self._o, node__o, nameSpace)
3746 if ret is None:raise treeError('xmlSearchNs() failed')
3747 __tmp = xmlNs(_obj=ret)
3750 def searchNsByHref(self, node, href):
3751 """Search a Ns aliasing a given URI. Recurse on the parents
3752 until it finds the defined namespace or return None
3754 if node is None: node__o = None
3755 else: node__o = node._o
3756 ret = libxml2mod.xmlSearchNsByHref(self._o, node__o, href)
3757 if ret is None:raise treeError('xmlSearchNsByHref() failed')
3758 __tmp = xmlNs(_obj=ret)
3761 def setDocCompressMode(self, mode):
3762 """set the compression ratio for a document, ZLIB based
3763 Correct values: 0 (uncompressed) to 9 (max compression) """
3764 libxml2mod.xmlSetDocCompressMode(self._o, mode)
3766 def setListDoc(self, list):
3767 """update all nodes in the list to point to the right document """
3768 if list is None: list__o = None
3769 else: list__o = list._o
3770 libxml2mod.xmlSetListDoc(list__o, self._o)
3772 def setRootElement(self, root):
3773 """Set the root element of the document (doc->children is a
3774 list containing possibly comments, PIs, etc ...). """
3775 if root is None: root__o = None
3776 else: root__o = root._o
3777 ret = libxml2mod.xmlDocSetRootElement(self._o, root__o)
3778 if ret is None:return None
3779 __tmp = xmlNode(_obj=ret)
3782 def setTreeDoc(self, tree):
3783 """update all nodes under the tree to point to the right
3785 if tree is None: tree__o = None
3786 else: tree__o = tree._o
3787 libxml2mod.xmlSetTreeDoc(tree__o, self._o)
3789 def stringGetNodeList(self, value):
3790 """Parse the value string and build the node list associated.
3791 Should produce a flat tree with only TEXTs and ENTITY_REFs. """
3792 ret = libxml2mod.xmlStringGetNodeList(self._o, value)
3793 if ret is None:raise treeError('xmlStringGetNodeList() failed')
3794 __tmp = xmlNode(_obj=ret)
3797 def stringLenGetNodeList(self, value, len):
3798 """Parse the value string and build the node list associated.
3799 Should produce a flat tree with only TEXTs and ENTITY_REFs. """
3800 ret = libxml2mod.xmlStringLenGetNodeList(self._o, value, len)
3801 if ret is None:raise treeError('xmlStringLenGetNodeList() failed')
3802 __tmp = xmlNode(_obj=ret)
3806 # xmlDoc functions from module valid
3810 """Search the attribute declaring the given ID """
3811 ret = libxml2mod.xmlGetID(self._o, ID)
3812 if ret is None:raise treeError('xmlGetID() failed')
3813 __tmp = xmlAttr(_obj=ret)
3816 def isID(self, elem, attr):
3817 """Determine whether an attribute is of type ID. In case we
3818 have DTD(s) then this is done if DTD loading has been
3819 requested. In the case of HTML documents parsed with the
3820 HTML parser, then ID detection is done systematically. """
3821 if elem is None: elem__o = None
3822 else: elem__o = elem._o
3823 if attr is None: attr__o = None
3824 else: attr__o = attr._o
3825 ret = libxml2mod.xmlIsID(self._o, elem__o, attr__o)
3828 def isMixedElement(self, name):
3829 """Search in the DtDs whether an element accept Mixed content
3830 (or ANY) basically if it is supposed to accept text childs """
3831 ret = libxml2mod.xmlIsMixedElement(self._o, name)
3834 def isRef(self, elem, attr):
3835 """Determine whether an attribute is of type Ref. In case we
3836 have DTD(s) then this is simple, otherwise we use an
3837 heuristic: name Ref (upper or lowercase). """
3838 if elem is None: elem__o = None
3839 else: elem__o = elem._o
3840 if attr is None: attr__o = None
3841 else: attr__o = attr._o
3842 ret = libxml2mod.xmlIsRef(self._o, elem__o, attr__o)
3845 def removeID(self, attr):
3846 """Remove the given attribute from the ID table maintained
3848 if attr is None: attr__o = None
3849 else: attr__o = attr._o
3850 ret = libxml2mod.xmlRemoveID(self._o, attr__o)
3853 def removeRef(self, attr):
3854 """Remove the given attribute from the Ref table maintained
3856 if attr is None: attr__o = None
3857 else: attr__o = attr._o
3858 ret = libxml2mod.xmlRemoveRef(self._o, attr__o)
3861 def validCtxtNormalizeAttributeValue(self, ctxt, elem, name, value):
3862 """Does the validation related extra step of the normalization
3863 of attribute values: If the declared value is not CDATA,
3864 then the XML processor must further process the normalized
3865 attribute value by discarding any leading and trailing
3866 space (#x20) characters, and by replacing sequences of
3867 space (#x20) characters by single space (#x20) character.
3868 Also check VC: Standalone Document Declaration in P32, and
3869 update ctxt->valid accordingly """
3870 if ctxt is None: ctxt__o = None
3871 else: ctxt__o = ctxt._o
3872 if elem is None: elem__o = None
3873 else: elem__o = elem._o
3874 ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(ctxt__o, self._o, elem__o, name, value)
3877 def validNormalizeAttributeValue(self, elem, name, value):
3878 """Does the validation related extra step of the normalization
3879 of attribute values: If the declared value is not CDATA,
3880 then the XML processor must further process the normalized
3881 attribute value by discarding any leading and trailing
3882 space (#x20) characters, and by replacing sequences of
3883 space (#x20) characters by single space (#x20) character. """
3884 if elem is None: elem__o = None
3885 else: elem__o = elem._o
3886 ret = libxml2mod.xmlValidNormalizeAttributeValue(self._o, elem__o, name, value)
3889 def validateDocument(self, ctxt):
3890 """Try to validate the document instance basically it does
3891 the all the checks described by the XML Rec i.e. validates
3892 the internal and external subset (if present) and validate
3893 the document tree. """
3894 if ctxt is None: ctxt__o = None
3895 else: ctxt__o = ctxt._o
3896 ret = libxml2mod.xmlValidateDocument(ctxt__o, self._o)
3899 def validateDocumentFinal(self, ctxt):
3900 """Does the final step for the document validation once all
3901 the incremental validation steps have been completed
3902 basically it does the following checks described by the XML
3903 Rec Check all the IDREF/IDREFS attributes definition for
3905 if ctxt is None: ctxt__o = None
3906 else: ctxt__o = ctxt._o
3907 ret = libxml2mod.xmlValidateDocumentFinal(ctxt__o, self._o)
3910 def validateDtd(self, ctxt, dtd):
3911 """Try to validate the document against the dtd instance
3912 Basically it does check all the definitions in the DtD.
3913 Note the the internal subset (if present) is de-coupled
3914 (i.e. not used), which could give problems if ID or IDREF
3916 if ctxt is None: ctxt__o = None
3917 else: ctxt__o = ctxt._o
3918 if dtd is None: dtd__o = None
3919 else: dtd__o = dtd._o
3920 ret = libxml2mod.xmlValidateDtd(ctxt__o, self._o, dtd__o)
3923 def validateDtdFinal(self, ctxt):
3924 """Does the final step for the dtds validation once all the
3925 subsets have been parsed basically it does the following
3926 checks described by the XML Rec - check that ENTITY and
3927 ENTITIES type attributes default or possible values matches
3928 one of the defined entities. - check that NOTATION type
3929 attributes default or possible values matches one of the
3930 defined notations. """
3931 if ctxt is None: ctxt__o = None
3932 else: ctxt__o = ctxt._o
3933 ret = libxml2mod.xmlValidateDtdFinal(ctxt__o, self._o)
3936 def validateElement(self, ctxt, elem):
3937 """Try to validate the subtree under an element """
3938 if ctxt is None: ctxt__o = None
3939 else: ctxt__o = ctxt._o
3940 if elem is None: elem__o = None
3941 else: elem__o = elem._o
3942 ret = libxml2mod.xmlValidateElement(ctxt__o, self._o, elem__o)
3945 def validateNotationUse(self, ctxt, notationName):
3946 """Validate that the given name match a notation declaration.
3947 - [ VC: Notation Declared ] """
3948 if ctxt is None: ctxt__o = None
3949 else: ctxt__o = ctxt._o
3950 ret = libxml2mod.xmlValidateNotationUse(ctxt__o, self._o, notationName)
3953 def validateOneAttribute(self, ctxt, elem, attr, value):
3954 """Try to validate a single attribute for an element basically
3955 it does the following checks as described by the XML-1.0
3956 recommendation: - [ VC: Attribute Value Type ] - [ VC:
3957 Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
3958 Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
3959 Name ] - [ VC: Notation Attributes ] The ID/IDREF
3960 uniqueness and matching are done separately """
3961 if ctxt is None: ctxt__o = None
3962 else: ctxt__o = ctxt._o
3963 if elem is None: elem__o = None
3964 else: elem__o = elem._o
3965 if attr is None: attr__o = None
3966 else: attr__o = attr._o
3967 ret = libxml2mod.xmlValidateOneAttribute(ctxt__o, self._o, elem__o, attr__o, value)
3970 def validateOneElement(self, ctxt, elem):
3971 """Try to validate a single element and it's attributes,
3972 basically it does the following checks as described by the
3973 XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
3974 Required Attribute ] Then call xmlValidateOneAttribute()
3975 for each attribute present. The ID/IDREF checkings are
3977 if ctxt is None: ctxt__o = None
3978 else: ctxt__o = ctxt._o
3979 if elem is None: elem__o = None
3980 else: elem__o = elem._o
3981 ret = libxml2mod.xmlValidateOneElement(ctxt__o, self._o, elem__o)
3984 def validateOneNamespace(self, ctxt, elem, prefix, ns, value):
3985 """Try to validate a single namespace declaration for an
3986 element basically it does the following checks as described
3987 by the XML-1.0 recommendation: - [ VC: Attribute Value Type
3988 ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
3989 [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
3990 Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
3991 uniqueness and matching are done separately """
3992 if ctxt is None: ctxt__o = None
3993 else: ctxt__o = ctxt._o
3994 if elem is None: elem__o = None
3995 else: elem__o = elem._o
3996 if ns is None: ns__o = None
3998 ret = libxml2mod.xmlValidateOneNamespace(ctxt__o, self._o, elem__o, prefix, ns__o, value)
4001 def validatePopElement(self, ctxt, elem, qname):
4002 """Pop the element end from the validation stack. """
4003 if ctxt is None: ctxt__o = None
4004 else: ctxt__o = ctxt._o
4005 if elem is None: elem__o = None
4006 else: elem__o = elem._o
4007 ret = libxml2mod.xmlValidatePopElement(ctxt__o, self._o, elem__o, qname)
4010 def validatePushElement(self, ctxt, elem, qname):
4011 """Push a new element start on the validation stack. """
4012 if ctxt is None: ctxt__o = None
4013 else: ctxt__o = ctxt._o
4014 if elem is None: elem__o = None
4015 else: elem__o = elem._o
4016 ret = libxml2mod.xmlValidatePushElement(ctxt__o, self._o, elem__o, qname)
4019 def validateRoot(self, ctxt):
4020 """Try to validate a the root element basically it does the
4021 following check as described by the XML-1.0 recommendation:
4022 - [ VC: Root Element Type ] it doesn't try to recurse or
4023 apply other check to the element """
4024 if ctxt is None: ctxt__o = None
4025 else: ctxt__o = ctxt._o
4026 ret = libxml2mod.xmlValidateRoot(ctxt__o, self._o)
4030 # xmlDoc functions from module xinclude
4033 def xincludeProcess(self):
4034 """Implement the XInclude substitution on the XML document @doc """
4035 ret = libxml2mod.xmlXIncludeProcess(self._o)
4038 def xincludeProcessFlags(self, flags):
4039 """Implement the XInclude substitution on the XML document @doc """
4040 ret = libxml2mod.xmlXIncludeProcessFlags(self._o, flags)
4044 # xmlDoc functions from module xmlreader
4047 def NewWalker(self, reader):
4048 """Setup an xmltextReader to parse a preparsed XML document.
4049 This reuses the existing @reader xmlTextReader. """
4050 if reader is None: reader__o = None
4051 else: reader__o = reader._o
4052 ret = libxml2mod.xmlReaderNewWalker(reader__o, self._o)
4055 def readerWalker(self):
4056 """Create an xmltextReader for a preparsed document. """
4057 ret = libxml2mod.xmlReaderWalker(self._o)
4058 if ret is None:raise treeError('xmlReaderWalker() failed')
4059 __tmp = xmlTextReader(_obj=ret)
4063 # xmlDoc functions from module xmlschemas
4066 def schemaNewDocParserCtxt(self):
4067 """Create an XML Schemas parse context for that document. NB.
4068 The document may be modified during the parsing process. """
4069 ret = libxml2mod.xmlSchemaNewDocParserCtxt(self._o)
4070 if ret is None:raise parserError('xmlSchemaNewDocParserCtxt() failed')
4071 __tmp = SchemaParserCtxt(_obj=ret)
4074 def schemaValidateDoc(self, ctxt):
4075 """Validate a document tree in memory. """
4076 if ctxt is None: ctxt__o = None
4077 else: ctxt__o = ctxt._o
4078 ret = libxml2mod.xmlSchemaValidateDoc(ctxt__o, self._o)
4082 # xmlDoc functions from module xpath
4085 def xpathNewContext(self):
4086 """Create a new xmlXPathContext """
4087 ret = libxml2mod.xmlXPathNewContext(self._o)
4088 if ret is None:raise xpathError('xmlXPathNewContext() failed')
4089 __tmp = xpathContext(_obj=ret)
4092 def xpathOrderDocElems(self):
4093 """Call this routine to speed up XPath computation on static
4094 documents. This stamps all the element nodes with the
4095 document order Like for line information, the order is kept
4096 in the element->content field, the value stored is actually
4097 - the node number (starting at -1) to be able to
4098 differentiate from line numbers. """
4099 ret = libxml2mod.xmlXPathOrderDocElems(self._o)
4103 # xmlDoc functions from module xpointer
4106 def xpointerNewContext(self, here, origin):
4107 """Create a new XPointer context """
4108 if here is None: here__o = None
4109 else: here__o = here._o
4110 if origin is None: origin__o = None
4111 else: origin__o = origin._o
4112 ret = libxml2mod.xmlXPtrNewContext(self._o, here__o, origin__o)
4113 if ret is None:raise treeError('xmlXPtrNewContext() failed')
4114 __tmp = xpathContext(_obj=ret)
4117 class parserCtxt(parserCtxtCore):
4118 def __init__(self, _obj=None):
4120 parserCtxtCore.__init__(self, _obj=_obj)
4124 libxml2mod.xmlFreeParserCtxt(self._o)
4127 # accessors for parserCtxt
4129 """Get the document tree from a parser context. """
4130 ret = libxml2mod.xmlParserGetDoc(self._o)
4131 if ret is None:raise parserError('xmlParserGetDoc() failed')
4132 __tmp = xmlDoc(_obj=ret)
4136 """Get the validity information from a parser context. """
4137 ret = libxml2mod.xmlParserGetIsValid(self._o)
4140 def lineNumbers(self, linenumbers):
4141 """Switch on the generation of line number for elements nodes. """
4142 libxml2mod.xmlParserSetLineNumbers(self._o, linenumbers)
4144 def loadSubset(self, loadsubset):
4145 """Switch the parser to load the DTD without validating. """
4146 libxml2mod.xmlParserSetLoadSubset(self._o, loadsubset)
4148 def pedantic(self, pedantic):
4149 """Switch the parser to be pedantic. """
4150 libxml2mod.xmlParserSetPedantic(self._o, pedantic)
4152 def replaceEntities(self, replaceEntities):
4153 """Switch the parser to replace entities. """
4154 libxml2mod.xmlParserSetReplaceEntities(self._o, replaceEntities)
4156 def validate(self, validate):
4157 """Switch the parser to validation mode. """
4158 libxml2mod.xmlParserSetValidate(self._o, validate)
4160 def wellFormed(self):
4161 """Get the well formed information from a parser context. """
4162 ret = libxml2mod.xmlParserGetWellFormed(self._o)
4166 # parserCtxt functions from module HTMLparser
4169 def htmlCtxtReadDoc(self, cur, URL, encoding, options):
4170 """parse an XML in-memory document and build a tree. This
4171 reuses the existing @ctxt parser context """
4172 ret = libxml2mod.htmlCtxtReadDoc(self._o, cur, URL, encoding, options)
4173 if ret is None:raise treeError('htmlCtxtReadDoc() failed')
4174 __tmp = xmlDoc(_obj=ret)
4177 def htmlCtxtReadFd(self, fd, URL, encoding, options):
4178 """parse an XML from a file descriptor and build a tree. This
4179 reuses the existing @ctxt parser context """
4180 ret = libxml2mod.htmlCtxtReadFd(self._o, fd, URL, encoding, options)
4181 if ret is None:raise treeError('htmlCtxtReadFd() failed')
4182 __tmp = xmlDoc(_obj=ret)
4185 def htmlCtxtReadFile(self, filename, encoding, options):
4186 """parse an XML file from the filesystem or the network. This
4187 reuses the existing @ctxt parser context """
4188 ret = libxml2mod.htmlCtxtReadFile(self._o, filename, encoding, options)
4189 if ret is None:raise treeError('htmlCtxtReadFile() failed')
4190 __tmp = xmlDoc(_obj=ret)
4193 def htmlCtxtReadMemory(self, buffer, size, URL, encoding, options):
4194 """parse an XML in-memory document and build a tree. This
4195 reuses the existing @ctxt parser context """
4196 ret = libxml2mod.htmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
4197 if ret is None:raise treeError('htmlCtxtReadMemory() failed')
4198 __tmp = xmlDoc(_obj=ret)
4201 def htmlCtxtReset(self):
4202 """Reset a parser context """
4203 libxml2mod.htmlCtxtReset(self._o)
4205 def htmlCtxtUseOptions(self, options):
4206 """Applies the options to the parser context """
4207 ret = libxml2mod.htmlCtxtUseOptions(self._o, options)
4210 def htmlFreeParserCtxt(self):
4211 """Free all the memory used by a parser context. However the
4212 parsed document in ctxt->myDoc is not freed. """
4213 libxml2mod.htmlFreeParserCtxt(self._o)
4215 def htmlParseCharRef(self):
4216 """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
4217 ';' | '&#x' [0-9a-fA-F]+ ';' """
4218 ret = libxml2mod.htmlParseCharRef(self._o)
4221 def htmlParseChunk(self, chunk, size, terminate):
4222 """Parse a Chunk of memory """
4223 ret = libxml2mod.htmlParseChunk(self._o, chunk, size, terminate)
4226 def htmlParseDocument(self):
4227 """parse an HTML document (and build a tree if using the
4228 standard SAX interface). """
4229 ret = libxml2mod.htmlParseDocument(self._o)
4232 def htmlParseElement(self):
4233 """parse an HTML element, this is highly recursive this is
4234 kept for compatibility with previous code versions [39]
4235 element ::= EmptyElemTag | STag content ETag [41]
4236 Attribute ::= Name Eq AttValue """
4237 libxml2mod.htmlParseElement(self._o)
4240 # parserCtxt functions from module parser
4243 def byteConsumed(self):
4244 """This function provides the current index of the parser
4245 relative to the start of the current entity. This function
4246 is computed in bytes from the beginning starting at zero
4247 and finishing at the size in byte of the file if parsing a
4248 file. The function is of constant cost if the input is
4249 UTF-8 but can be costly if run on non-UTF-8 input. """
4250 ret = libxml2mod.xmlByteConsumed(self._o)
4253 def clearParserCtxt(self):
4254 """Clear (release owned resources) and reinitialize a parser
4256 libxml2mod.xmlClearParserCtxt(self._o)
4258 def ctxtReadDoc(self, cur, URL, encoding, options):
4259 """parse an XML in-memory document and build a tree. This
4260 reuses the existing @ctxt parser context """
4261 ret = libxml2mod.xmlCtxtReadDoc(self._o, cur, URL, encoding, options)
4262 if ret is None:raise treeError('xmlCtxtReadDoc() failed')
4263 __tmp = xmlDoc(_obj=ret)
4266 def ctxtReadFd(self, fd, URL, encoding, options):
4267 """parse an XML from a file descriptor and build a tree. This
4268 reuses the existing @ctxt parser context NOTE that the file
4269 descriptor will not be closed when the reader is closed or
4271 ret = libxml2mod.xmlCtxtReadFd(self._o, fd, URL, encoding, options)
4272 if ret is None:raise treeError('xmlCtxtReadFd() failed')
4273 __tmp = xmlDoc(_obj=ret)
4276 def ctxtReadFile(self, filename, encoding, options):
4277 """parse an XML file from the filesystem or the network. This
4278 reuses the existing @ctxt parser context """
4279 ret = libxml2mod.xmlCtxtReadFile(self._o, filename, encoding, options)
4280 if ret is None:raise treeError('xmlCtxtReadFile() failed')
4281 __tmp = xmlDoc(_obj=ret)
4284 def ctxtReadMemory(self, buffer, size, URL, encoding, options):
4285 """parse an XML in-memory document and build a tree. This
4286 reuses the existing @ctxt parser context """
4287 ret = libxml2mod.xmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
4288 if ret is None:raise treeError('xmlCtxtReadMemory() failed')
4289 __tmp = xmlDoc(_obj=ret)
4292 def ctxtReset(self):
4293 """Reset a parser context """
4294 libxml2mod.xmlCtxtReset(self._o)
4296 def ctxtResetPush(self, chunk, size, filename, encoding):
4297 """Reset a push parser context """
4298 ret = libxml2mod.xmlCtxtResetPush(self._o, chunk, size, filename, encoding)
4301 def ctxtUseOptions(self, options):
4302 """Applies the options to the parser context """
4303 ret = libxml2mod.xmlCtxtUseOptions(self._o, options)
4306 def initParserCtxt(self):
4307 """Initialize a parser context """
4308 ret = libxml2mod.xmlInitParserCtxt(self._o)
4311 def parseChunk(self, chunk, size, terminate):
4312 """Parse a Chunk of memory """
4313 ret = libxml2mod.xmlParseChunk(self._o, chunk, size, terminate)
4316 def parseDocument(self):
4317 """parse an XML document (and build a tree if using the
4318 standard SAX interface). [1] document ::= prolog element
4319 Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? """
4320 ret = libxml2mod.xmlParseDocument(self._o)
4323 def parseExtParsedEnt(self):
4324 """parse a general parsed entity An external general parsed
4325 entity is well-formed if it matches the production labeled
4326 extParsedEnt. [78] extParsedEnt ::= TextDecl? content """
4327 ret = libxml2mod.xmlParseExtParsedEnt(self._o)
4330 def setupParserForBuffer(self, buffer, filename):
4331 """Setup the parser context to parse a new buffer; Clears any
4332 prior contents from the parser context. The buffer
4333 parameter must not be None, but the filename parameter can
4335 libxml2mod.xmlSetupParserForBuffer(self._o, buffer, filename)
4337 def stopParser(self):
4338 """Blocks further parser processing """
4339 libxml2mod.xmlStopParser(self._o)
4342 # parserCtxt functions from module parserInternals
4345 def decodeEntities(self, len, what, end, end2, end3):
4346 """This function is deprecated, we now always process entities
4347 content through xmlStringDecodeEntities TODO: remove it in
4348 next major release. [67] Reference ::= EntityRef | CharRef
4349 [69] PEReference ::= '%' Name ';' """
4350 ret = libxml2mod.xmlDecodeEntities(self._o, len, what, end, end2, end3)
4353 def handleEntity(self, entity):
4354 """Default handling of defined entities, when should we define
4355 a new input stream ? When do we just handle that as a set
4356 of chars ? OBSOLETE: to be removed at some point. """
4357 if entity is None: entity__o = None
4358 else: entity__o = entity._o
4359 libxml2mod.xmlHandleEntity(self._o, entity__o)
4361 def namespaceParseNCName(self):
4362 """parse an XML namespace name. TODO: this seems not in use
4363 anymore, the namespace handling is done on top of the SAX
4364 interfaces, i.e. not on raw input. [NS 3] NCName ::=
4365 (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter
4366 | Digit | '.' | '-' | '_' | CombiningChar | Extender """
4367 ret = libxml2mod.xmlNamespaceParseNCName(self._o)
4370 def namespaceParseNSDef(self):
4371 """parse a namespace prefix declaration TODO: this seems not
4372 in use anymore, the namespace handling is done on top of
4373 the SAX interfaces, i.e. not on raw input. [NS 1] NSDef
4374 ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::=
4375 'xmlns' (':' NCName)? """
4376 ret = libxml2mod.xmlNamespaceParseNSDef(self._o)
4380 """Skip to the next char input char. """
4381 libxml2mod.xmlNextChar(self._o)
4383 def parseAttValue(self):
4384 """parse a value for an attribute Note: the parser won't do
4385 substitution of entities here, this will be handled later
4386 in xmlStringGetNodeList [10] AttValue ::= '"' ([^<&"] |
4387 Reference)* '"' | "'" ([^<&'] | Reference)* "'" 3.3.3
4388 Attribute-Value Normalization: Before the value of an
4389 attribute is passed to the application or checked for
4390 validity, the XML processor must normalize it as follows: -
4391 a character reference is processed by appending the
4392 referenced character to the attribute value - an entity
4393 reference is processed by recursively processing the
4394 replacement text of the entity - a whitespace character
4395 (#x20, #xD, #xA, #x9) is processed by appending #x20 to the
4396 normalized value, except that only a single #x20 is
4397 appended for a "#xD#xA" sequence that is part of an
4398 external parsed entity or the literal entity value of an
4399 internal parsed entity - other characters are processed by
4400 appending them to the normalized value If the declared
4401 value is not CDATA, then the XML processor must further
4402 process the normalized attribute value by discarding any
4403 leading and trailing space (#x20) characters, and by
4404 replacing sequences of space (#x20) characters by a single
4405 space (#x20) character. All attributes for which no
4406 declaration has been read should be treated by a
4407 non-validating parser as if declared CDATA. """
4408 ret = libxml2mod.xmlParseAttValue(self._o)
4411 def parseAttributeListDecl(self):
4412 """: parse the Attribute list def for an element [52]
4413 AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53]
4414 AttDef ::= S Name S AttType S DefaultDecl """
4415 libxml2mod.xmlParseAttributeListDecl(self._o)
4417 def parseCDSect(self):
4418 """Parse escaped pure raw content. [18] CDSect ::= CDStart
4419 CData CDEnd [19] CDStart ::= '<![CDATA[' [20] Data ::=
4420 (Char* - (Char* ']]>' Char*)) [21] CDEnd ::= ']]>' """
4421 libxml2mod.xmlParseCDSect(self._o)
4423 def parseCharData(self, cdata):
4424 """parse a CharData section. if we are within a CDATA section
4425 ']]>' marks an end of section. The right angle bracket (>)
4426 may be represented using the string ">", and must, for
4427 compatibility, be escaped using ">" or a character
4428 reference when it appears in the string "]]>" in content,
4429 when that string is not marking the end of a CDATA section.
4430 [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) """
4431 libxml2mod.xmlParseCharData(self._o, cdata)
4433 def parseCharRef(self):
4434 """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
4435 ';' | '&#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ]
4436 Characters referred to using character references must
4437 match the production for Char. """
4438 ret = libxml2mod.xmlParseCharRef(self._o)
4441 def parseComment(self):
4442 """Skip an XML (SGML) comment <!-- .... --> The spec says that
4443 "For compatibility, the string "--" (double-hyphen) must
4444 not occur within comments. " [15] Comment ::= '<!--'
4445 ((Char - '-') | ('-' (Char - '-')))* '-->' """
4446 libxml2mod.xmlParseComment(self._o)
4448 def parseContent(self):
4449 """Parse a content: [43] content ::= (element | CharData |
4450 Reference | CDSect | PI | Comment)* """
4451 libxml2mod.xmlParseContent(self._o)
4453 def parseDocTypeDecl(self):
4454 """parse a DOCTYPE declaration [28] doctypedecl ::=
4455 '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl |
4456 PEReference | S)* ']' S?)? '>' [ VC: Root Element Type ]
4457 The Name in the document type declaration must match the
4458 element type of the root element. """
4459 libxml2mod.xmlParseDocTypeDecl(self._o)
4461 def parseElement(self):
4462 """parse an XML element, this is highly recursive [39]
4463 element ::= EmptyElemTag | STag content ETag [ WFC:
4464 Element Type Match ] The Name in an element's end-tag must
4465 match the element type in the start-tag. """
4466 libxml2mod.xmlParseElement(self._o)
4468 def parseElementDecl(self):
4469 """parse an Element declaration. [45] elementdecl ::=
4470 '<!ELEMENT' S Name S contentspec S? '>' [ VC: Unique
4471 Element Type Declaration ] No element type may be declared
4473 ret = libxml2mod.xmlParseElementDecl(self._o)
4476 def parseEncName(self):
4477 """parse the XML encoding name [81] EncName ::= [A-Za-z]
4478 ([A-Za-z0-9._] | '-')* """
4479 ret = libxml2mod.xmlParseEncName(self._o)
4482 def parseEncodingDecl(self):
4483 """parse the XML encoding declaration [80] EncodingDecl ::= S
4484 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this
4485 setups the conversion filters. """
4486 ret = libxml2mod.xmlParseEncodingDecl(self._o)
4489 def parseEndTag(self):
4490 """parse an end of tag [42] ETag ::= '</' Name S? '>' With
4491 namespace [NS 9] ETag ::= '</' QName S? '>' """
4492 libxml2mod.xmlParseEndTag(self._o)
4494 def parseEntityDecl(self):
4495 """parse <!ENTITY declarations [70] EntityDecl ::= GEDecl |
4496 PEDecl [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S?
4497 '>' [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
4498 [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
4499 [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::=
4500 S 'NDATA' S Name [ VC: Notation Declared ] The Name must
4501 match the declared name of a notation. """
4502 libxml2mod.xmlParseEntityDecl(self._o)
4504 def parseEntityRef(self):
4505 """parse ENTITY references declarations [68] EntityRef ::=
4506 '&' Name ';' [ WFC: Entity Declared ] In a document
4507 without any DTD, a document with only an internal DTD
4508 subset which contains no parameter entity references, or a
4509 document with "standalone='yes'", the Name given in the
4510 entity reference must match that in an entity declaration,
4511 except that well-formed documents need not declare any of
4512 the following entities: amp, lt, gt, apos, quot. The
4513 declaration of a parameter entity must precede any
4514 reference to it. Similarly, the declaration of a general
4515 entity must precede any reference to it which appears in a
4516 default value in an attribute-list declaration. Note that
4517 if entities are declared in the external subset or in
4518 external parameter entities, a non-validating processor is
4519 not obligated to read and process their declarations; for
4520 such documents, the rule that an entity must be declared is
4521 a well-formedness constraint only if standalone='yes'. [
4522 WFC: Parsed Entity ] An entity reference must not contain
4523 the name of an unparsed entity """
4524 ret = libxml2mod.xmlParseEntityRef(self._o)
4525 if ret is None:raise parserError('xmlParseEntityRef() failed')
4526 __tmp = xmlEntity(_obj=ret)
4529 def parseExternalSubset(self, ExternalID, SystemID):
4530 """parse Markup declarations from an external subset [30]
4531 extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl
4532 ::= (markupdecl | conditionalSect | PEReference | S) * """
4533 libxml2mod.xmlParseExternalSubset(self._o, ExternalID, SystemID)
4535 def parseMarkupDecl(self):
4536 """parse Markup declarations [29] markupdecl ::= elementdecl
4537 | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [
4538 VC: Proper Declaration/PE Nesting ] Parameter-entity
4539 replacement text must be properly nested with markup
4540 declarations. That is to say, if either the first character
4541 or the last character of a markup declaration (markupdecl
4542 above) is contained in the replacement text for a
4543 parameter-entity reference, both must be contained in the
4544 same replacement text. [ WFC: PEs in Internal Subset ] In
4545 the internal DTD subset, parameter-entity references can
4546 occur only where markup declarations can occur, not within
4547 markup declarations. (This does not apply to references
4548 that occur in external parameter entities or to the
4549 external subset.) """
4550 libxml2mod.xmlParseMarkupDecl(self._o)
4552 def parseMisc(self):
4553 """parse an XML Misc* optional field. [27] Misc ::= Comment |
4555 libxml2mod.xmlParseMisc(self._o)
4557 def parseName(self):
4558 """parse an XML name. [4] NameChar ::= Letter | Digit | '.' |
4559 '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
4560 (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (#x20
4562 ret = libxml2mod.xmlParseName(self._o)
4565 def parseNamespace(self):
4566 """xmlParseNamespace: parse specific PI '<?namespace ...'
4567 constructs. This is what the older xml-name Working Draft
4568 specified, a bunch of other stuff may still rely on it, so
4569 support is still here as if it was declared on the root of
4570 the Tree:-( TODO: remove from library To be removed at
4571 next drop of binary compatibility """
4572 libxml2mod.xmlParseNamespace(self._o)
4574 def parseNmtoken(self):
4575 """parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8]
4576 Nmtokens ::= Nmtoken (#x20 Nmtoken)* """
4577 ret = libxml2mod.xmlParseNmtoken(self._o)
4580 def parseNotationDecl(self):
4581 """parse a notation declaration [82] NotationDecl ::=
4582 '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'
4583 Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral
4584 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S
4585 SystemLiteral See the NOTE on xmlParseExternalID(). """
4586 libxml2mod.xmlParseNotationDecl(self._o)
4588 def parsePEReference(self):
4589 """parse PEReference declarations The entity content is
4590 handled directly by pushing it's content as a new input
4591 stream. [69] PEReference ::= '%' Name ';' [ WFC: No
4592 Recursion ] A parsed entity must not contain a recursive
4593 reference to itself, either directly or indirectly. [ WFC:
4594 Entity Declared ] In a document without any DTD, a document
4595 with only an internal DTD subset which contains no
4596 parameter entity references, or a document with
4597 "standalone='yes'", ... ... The declaration of a parameter
4598 entity must precede any reference to it... [ VC: Entity
4599 Declared ] In a document with an external subset or
4600 external parameter entities with "standalone='no'", ...
4601 ... The declaration of a parameter entity must precede any
4602 reference to it... [ WFC: In DTD ] Parameter-entity
4603 references may only appear in the DTD. NOTE: misleading but
4604 this is handled. """
4605 libxml2mod.xmlParsePEReference(self._o)
4608 """parse an XML Processing Instruction. [16] PI ::= '<?'
4609 PITarget (S (Char* - (Char* '?>' Char*)))? '?>' The
4610 processing is transfered to SAX once parsed. """
4611 libxml2mod.xmlParsePI(self._o)
4613 def parsePITarget(self):
4614 """parse the name of a PI [17] PITarget ::= Name - (('X' |
4615 'x') ('M' | 'm') ('L' | 'l')) """
4616 ret = libxml2mod.xmlParsePITarget(self._o)
4619 def parsePubidLiteral(self):
4620 """parse an XML public literal [12] PubidLiteral ::= '"'
4621 PubidChar* '"' | "'" (PubidChar - "'")* "'" """
4622 ret = libxml2mod.xmlParsePubidLiteral(self._o)
4625 def parseQuotedString(self):
4626 """Parse and return a string between quotes or doublequotes
4627 TODO: Deprecated, to be removed at next drop of binary
4629 ret = libxml2mod.xmlParseQuotedString(self._o)
4632 def parseReference(self):
4633 """parse and handle entity references in content, depending on
4634 the SAX interface, this may end-up in a call to character()
4635 if this is a CharRef, a predefined entity, if there is no
4636 reference() callback. or if the parser was asked to switch
4637 to that mode. [67] Reference ::= EntityRef | CharRef """
4638 libxml2mod.xmlParseReference(self._o)
4640 def parseSDDecl(self):
4641 """parse the XML standalone declaration [32] SDDecl ::= S
4642 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' |
4643 'no')'"')) [ VC: Standalone Document Declaration ] TODO
4644 The standalone document declaration must have the value
4645 "no" if any external markup declarations contain
4646 declarations of: - attributes with default values, if
4647 elements to which these attributes apply appear in the
4648 document without specifications of values for these
4649 attributes, or - entities (other than amp, lt, gt, apos,
4650 quot), if references to those entities appear in the
4651 document, or - attributes with values subject to
4652 normalization, where the attribute appears in the document
4653 with a value which will change as a result of
4654 normalization, or - element types with element content, if
4655 white space occurs directly within any instance of those
4657 ret = libxml2mod.xmlParseSDDecl(self._o)
4660 def parseStartTag(self):
4661 """parse a start of tag either for rule element or
4662 EmptyElement. In both case we don't parse the tag closing
4663 chars. [40] STag ::= '<' Name (S Attribute)* S? '>' [
4664 WFC: Unique Att Spec ] No attribute name may appear more
4665 than once in the same start-tag or empty-element tag. [44]
4666 EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [ WFC:
4667 Unique Att Spec ] No attribute name may appear more than
4668 once in the same start-tag or empty-element tag. With
4669 namespace: [NS 8] STag ::= '<' QName (S Attribute)* S? '>'
4670 [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>' """
4671 ret = libxml2mod.xmlParseStartTag(self._o)
4674 def parseSystemLiteral(self):
4675 """parse an XML Literal [11] SystemLiteral ::= ('"' [^"]*
4676 '"') | ("'" [^']* "'") """
4677 ret = libxml2mod.xmlParseSystemLiteral(self._o)
4680 def parseTextDecl(self):
4681 """parse an XML declaration header for external entities [77]
4682 TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' """
4683 libxml2mod.xmlParseTextDecl(self._o)
4685 def parseVersionInfo(self):
4686 """parse the XML version. [24] VersionInfo ::= S 'version' Eq
4687 (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S? """
4688 ret = libxml2mod.xmlParseVersionInfo(self._o)
4691 def parseVersionNum(self):
4692 """parse the XML version value. [26] VersionNum ::= '1.'
4693 [0-9]+ In practice allow [0-9].[0-9]+ at that level """
4694 ret = libxml2mod.xmlParseVersionNum(self._o)
4697 def parseXMLDecl(self):
4698 """parse an XML declaration header [23] XMLDecl ::= '<?xml'
4699 VersionInfo EncodingDecl? SDDecl? S? '?>' """
4700 libxml2mod.xmlParseXMLDecl(self._o)
4702 def parserHandlePEReference(self):
4703 """[69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A
4704 parsed entity must not contain a recursive reference to
4705 itself, either directly or indirectly. [ WFC: Entity
4706 Declared ] In a document without any DTD, a document with
4707 only an internal DTD subset which contains no parameter
4708 entity references, or a document with "standalone='yes'",
4709 ... ... The declaration of a parameter entity must precede
4710 any reference to it... [ VC: Entity Declared ] In a
4711 document with an external subset or external parameter
4712 entities with "standalone='no'", ... ... The declaration
4713 of a parameter entity must precede any reference to it...
4714 [ WFC: In DTD ] Parameter-entity references may only appear
4715 in the DTD. NOTE: misleading but this is handled. A
4716 PEReference may have been detected in the current input
4717 stream the handling is done accordingly to
4718 http://www.w3.org/TR/REC-xml#entproc i.e. - Included in
4719 literal in entity values - Included as Parameter Entity
4720 reference within DTDs """
4721 libxml2mod.xmlParserHandlePEReference(self._o)
4723 def parserHandleReference(self):
4724 """TODO: Remove, now deprecated ... the test is done directly
4725 in the content parsing routines. [67] Reference ::=
4726 EntityRef | CharRef [68] EntityRef ::= '&' Name ';' [
4727 WFC: Entity Declared ] the Name given in the entity
4728 reference must match that in an entity declaration, except
4729 that well-formed documents need not declare any of the
4730 following entities: amp, lt, gt, apos, quot. [ WFC: Parsed
4731 Entity ] An entity reference must not contain the name of
4732 an unparsed entity [66] CharRef ::= '&#' [0-9]+ ';' |
4733 '&#x' [0-9a-fA-F]+ ';' A PEReference may have been
4734 detected in the current input stream the handling is done
4735 accordingly to http://www.w3.org/TR/REC-xml#entproc """
4736 libxml2mod.xmlParserHandleReference(self._o)
4739 """xmlPopInput: the current input pointed by ctxt->input came
4740 to an end pop it and return the next char. """
4741 ret = libxml2mod.xmlPopInput(self._o)
4745 """Trickery: parse an XML name but without consuming the input
4746 flow Needed for rollback cases. Used only when parsing
4747 entities references. TODO: seems deprecated now, only used
4748 in the default part of xmlParserHandleReference [4]
4749 NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
4750 CombiningChar | Extender [5] Name ::= (Letter | '_' | ':')
4751 (NameChar)* [6] Names ::= Name (S Name)* """
4752 ret = libxml2mod.xmlScanName(self._o)
4755 def skipBlankChars(self):
4756 """skip all blanks character found at that point in the input
4757 streams. It pops up finished entities in the process if
4758 allowable at that point. """
4759 ret = libxml2mod.xmlSkipBlankChars(self._o)
4762 def stringDecodeEntities(self, str, what, end, end2, end3):
4763 """Takes a entity string content and process to do the
4764 adequate substitutions. [67] Reference ::= EntityRef |
4765 CharRef [69] PEReference ::= '%' Name ';' """
4766 ret = libxml2mod.xmlStringDecodeEntities(self._o, str, what, end, end2, end3)
4769 def stringLenDecodeEntities(self, str, len, what, end, end2, end3):
4770 """Takes a entity string content and process to do the
4771 adequate substitutions. [67] Reference ::= EntityRef |
4772 CharRef [69] PEReference ::= '%' Name ';' """
4773 ret = libxml2mod.xmlStringLenDecodeEntities(self._o, str, len, what, end, end2, end3)
4776 class xmlAttr(xmlNode):
4777 def __init__(self, _obj=None):
4778 if checkWrapper(_obj) != 0: raise TypeError('xmlAttr got a wrong wrapper object type')
4780 xmlNode.__init__(self, _obj=_obj)
4783 return "<xmlAttr (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
4786 # xmlAttr functions from module debugXML
4789 def debugDumpAttr(self, output, depth):
4790 """Dumps debug information for the attribute """
4791 libxml2mod.xmlDebugDumpAttr(output, self._o, depth)
4793 def debugDumpAttrList(self, output, depth):
4794 """Dumps debug information for the attribute list """
4795 libxml2mod.xmlDebugDumpAttrList(output, self._o, depth)
4798 # xmlAttr functions from module tree
4801 def copyProp(self, target):
4802 """Do a copy of the attribute. """
4803 if target is None: target__o = None
4804 else: target__o = target._o
4805 ret = libxml2mod.xmlCopyProp(target__o, self._o)
4806 if ret is None:raise treeError('xmlCopyProp() failed')
4807 __tmp = xmlAttr(_obj=ret)
4810 def copyPropList(self, target):
4811 """Do a copy of an attribute list. """
4812 if target is None: target__o = None
4813 else: target__o = target._o
4814 ret = libxml2mod.xmlCopyPropList(target__o, self._o)
4815 if ret is None:raise treeError('xmlCopyPropList() failed')
4816 __tmp = xmlAttr(_obj=ret)
4820 """Free one attribute, all the content is freed too """
4821 libxml2mod.xmlFreeProp(self._o)
4823 def freePropList(self):
4824 """Free a property and all its siblings, all the children are
4826 libxml2mod.xmlFreePropList(self._o)
4828 def removeProp(self):
4829 """Unlink and free one attribute, all the content is freed too
4830 Note this doesn't work for namespace definition attributes """
4831 ret = libxml2mod.xmlRemoveProp(self._o)
4835 # xmlAttr functions from module valid
4838 def removeID(self, doc):
4839 """Remove the given attribute from the ID table maintained
4841 if doc is None: doc__o = None
4842 else: doc__o = doc._o
4843 ret = libxml2mod.xmlRemoveID(doc__o, self._o)
4846 def removeRef(self, doc):
4847 """Remove the given attribute from the Ref table maintained
4849 if doc is None: doc__o = None
4850 else: doc__o = doc._o
4851 ret = libxml2mod.xmlRemoveRef(doc__o, self._o)
4854 class xmlAttribute(xmlNode):
4855 def __init__(self, _obj=None):
4856 if checkWrapper(_obj) != 0: raise TypeError('xmlAttribute got a wrong wrapper object type')
4858 xmlNode.__init__(self, _obj=_obj)
4861 return "<xmlAttribute (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
4864 def __init__(self, _obj=None):
4865 if _obj != None:self._o = _obj;return
4870 libxml2mod.xmlFreeCatalog(self._o)
4874 # catalog functions from module catalog
4877 def add(self, type, orig, replace):
4878 """Add an entry in the catalog, it may overwrite existing but
4879 different entries. """
4880 ret = libxml2mod.xmlACatalogAdd(self._o, type, orig, replace)
4883 def catalogIsEmpty(self):
4884 """Check is a catalog is empty """
4885 ret = libxml2mod.xmlCatalogIsEmpty(self._o)
4888 def convertSGMLCatalog(self):
4889 """Convert all the SGML catalog entries as XML ones """
4890 ret = libxml2mod.xmlConvertSGMLCatalog(self._o)
4893 def dump(self, out):
4894 """Dump the given catalog to the given file. """
4895 libxml2mod.xmlACatalogDump(self._o, out)
4897 def remove(self, value):
4898 """Remove an entry from the catalog """
4899 ret = libxml2mod.xmlACatalogRemove(self._o, value)
4902 def resolve(self, pubID, sysID):
4903 """Do a complete resolution lookup of an External Identifier """
4904 ret = libxml2mod.xmlACatalogResolve(self._o, pubID, sysID)
4907 def resolvePublic(self, pubID):
4908 """Try to lookup the catalog local reference associated to a
4909 public ID in that catalog """
4910 ret = libxml2mod.xmlACatalogResolvePublic(self._o, pubID)
4913 def resolveSystem(self, sysID):
4914 """Try to lookup the catalog resource for a system ID """
4915 ret = libxml2mod.xmlACatalogResolveSystem(self._o, sysID)
4918 def resolveURI(self, URI):
4919 """Do a complete resolution lookup of an URI """
4920 ret = libxml2mod.xmlACatalogResolveURI(self._o, URI)
4923 class xmlDtd(xmlNode):
4924 def __init__(self, _obj=None):
4925 if checkWrapper(_obj) != 0: raise TypeError('xmlDtd got a wrong wrapper object type')
4927 xmlNode.__init__(self, _obj=_obj)
4930 return "<xmlDtd (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
4933 # xmlDtd functions from module debugXML
4936 def debugDumpDTD(self, output):
4937 """Dumps debug information for the DTD """
4938 libxml2mod.xmlDebugDumpDTD(output, self._o)
4941 # xmlDtd functions from module tree
4945 """Do a copy of the dtd. """
4946 ret = libxml2mod.xmlCopyDtd(self._o)
4947 if ret is None:raise treeError('xmlCopyDtd() failed')
4948 __tmp = xmlDtd(_obj=ret)
4952 """Free a DTD structure. """
4953 libxml2mod.xmlFreeDtd(self._o)
4956 # xmlDtd functions from module valid
4959 def dtdAttrDesc(self, elem, name):
4960 """Search the DTD for the description of this attribute on
4962 ret = libxml2mod.xmlGetDtdAttrDesc(self._o, elem, name)
4963 if ret is None:raise treeError('xmlGetDtdAttrDesc() failed')
4964 __tmp = xmlAttribute(_obj=ret)
4967 def dtdElementDesc(self, name):
4968 """Search the DTD for the description of this element """
4969 ret = libxml2mod.xmlGetDtdElementDesc(self._o, name)
4970 if ret is None:raise treeError('xmlGetDtdElementDesc() failed')
4971 __tmp = xmlElement(_obj=ret)
4974 def dtdQAttrDesc(self, elem, name, prefix):
4975 """Search the DTD for the description of this qualified
4976 attribute on this element. """
4977 ret = libxml2mod.xmlGetDtdQAttrDesc(self._o, elem, name, prefix)
4978 if ret is None:raise treeError('xmlGetDtdQAttrDesc() failed')
4979 __tmp = xmlAttribute(_obj=ret)
4982 def dtdQElementDesc(self, name, prefix):
4983 """Search the DTD for the description of this element """
4984 ret = libxml2mod.xmlGetDtdQElementDesc(self._o, name, prefix)
4985 if ret is None:raise treeError('xmlGetDtdQElementDesc() failed')
4986 __tmp = xmlElement(_obj=ret)
4989 class xmlElement(xmlNode):
4990 def __init__(self, _obj=None):
4991 if checkWrapper(_obj) != 0: raise TypeError('xmlElement got a wrong wrapper object type')
4993 xmlNode.__init__(self, _obj=_obj)
4996 return "<xmlElement (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
4998 class xmlEntity(xmlNode):
4999 def __init__(self, _obj=None):
5000 if checkWrapper(_obj) != 0: raise TypeError('xmlEntity got a wrong wrapper object type')
5002 xmlNode.__init__(self, _obj=_obj)
5005 return "<xmlEntity (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
5008 # xmlEntity functions from module parserInternals
5011 def handleEntity(self, ctxt):
5012 """Default handling of defined entities, when should we define
5013 a new input stream ? When do we just handle that as a set
5014 of chars ? OBSOLETE: to be removed at some point. """
5015 if ctxt is None: ctxt__o = None
5016 else: ctxt__o = ctxt._o
5017 libxml2mod.xmlHandleEntity(ctxt__o, self._o)
5020 def __init__(self, _obj=None):
5021 if _obj != None:self._o = _obj;return
5024 # accessors for Error
5026 """The error code, e.g. an xmlParserError """
5027 ret = libxml2mod.xmlErrorGetCode(self._o)
5031 """What part of the library raised this error """
5032 ret = libxml2mod.xmlErrorGetDomain(self._o)
5037 ret = libxml2mod.xmlErrorGetFile(self._o)
5041 """how consequent is the error """
5042 ret = libxml2mod.xmlErrorGetLevel(self._o)
5046 """the line number if available """
5047 ret = libxml2mod.xmlErrorGetLine(self._o)
5051 """human-readable informative error message """
5052 ret = libxml2mod.xmlErrorGetMessage(self._o)
5056 # Error functions from module xmlerror
5059 def copyError(self, to):
5060 """Save the original error to the new place. """
5061 if to is None: to__o = None
5063 ret = libxml2mod.xmlCopyError(self._o, to__o)
5066 def resetError(self):
5067 """Cleanup the error. """
5068 libxml2mod.xmlResetError(self._o)
5070 class xmlNs(xmlNode):
5071 def __init__(self, _obj=None):
5072 if checkWrapper(_obj) != 0: raise TypeError('xmlNs got a wrong wrapper object type')
5074 xmlNode.__init__(self, _obj=_obj)
5077 return "<xmlNs (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
5080 # xmlNs functions from module tree
5083 def copyNamespace(self):
5084 """Do a copy of the namespace. """
5085 ret = libxml2mod.xmlCopyNamespace(self._o)
5086 if ret is None:raise treeError('xmlCopyNamespace() failed')
5087 __tmp = xmlNs(_obj=ret)
5090 def copyNamespaceList(self):
5091 """Do a copy of an namespace list. """
5092 ret = libxml2mod.xmlCopyNamespaceList(self._o)
5093 if ret is None:raise treeError('xmlCopyNamespaceList() failed')
5094 __tmp = xmlNs(_obj=ret)
5098 """Free up the structures associated to a namespace """
5099 libxml2mod.xmlFreeNs(self._o)
5101 def freeNsList(self):
5102 """Free up all the structures associated to the chained
5104 libxml2mod.xmlFreeNsList(self._o)
5106 def newChild(self, parent, name, content):
5107 """Creation of a new child element, added at the end of
5108 @parent children list. @ns and @content parameters are
5109 optional (None). If @ns is None, the newly created element
5110 inherits the namespace of @parent. If @content is non None,
5111 a child list containing the TEXTs and ENTITY_REFs node will
5112 be created. NOTE: @content is supposed to be a piece of XML
5113 CDATA, so it allows entity references. XML special chars
5114 must be escaped first by using
5115 xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
5117 if parent is None: parent__o = None
5118 else: parent__o = parent._o
5119 ret = libxml2mod.xmlNewChild(parent__o, self._o, name, content)
5120 if ret is None:raise treeError('xmlNewChild() failed')
5121 __tmp = xmlNode(_obj=ret)
5124 def newDocNode(self, doc, name, content):
5125 """Creation of a new node element within a document. @ns and
5126 @content are optional (None). NOTE: @content is supposed to
5127 be a piece of XML CDATA, so it allow entities references,
5128 but XML special chars need to be escaped first by using
5129 xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
5130 don't need entities support. """
5131 if doc is None: doc__o = None
5132 else: doc__o = doc._o
5133 ret = libxml2mod.xmlNewDocNode(doc__o, self._o, name, content)
5134 if ret is None:raise treeError('xmlNewDocNode() failed')
5135 __tmp = xmlNode(_obj=ret)
5138 def newDocNodeEatName(self, doc, name, content):
5139 """Creation of a new node element within a document. @ns and
5140 @content are optional (None). NOTE: @content is supposed to
5141 be a piece of XML CDATA, so it allow entities references,
5142 but XML special chars need to be escaped first by using
5143 xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
5144 don't need entities support. """
5145 if doc is None: doc__o = None
5146 else: doc__o = doc._o
5147 ret = libxml2mod.xmlNewDocNodeEatName(doc__o, self._o, name, content)
5148 if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
5149 __tmp = xmlNode(_obj=ret)
5152 def newDocRawNode(self, doc, name, content):
5153 """Creation of a new node element within a document. @ns and
5154 @content are optional (None). """
5155 if doc is None: doc__o = None
5156 else: doc__o = doc._o
5157 ret = libxml2mod.xmlNewDocRawNode(doc__o, self._o, name, content)
5158 if ret is None:raise treeError('xmlNewDocRawNode() failed')
5159 __tmp = xmlNode(_obj=ret)
5162 def newNodeEatName(self, name):
5163 """Creation of a new node element. @ns is optional (None). """
5164 ret = libxml2mod.xmlNewNodeEatName(self._o, name)
5165 if ret is None:raise treeError('xmlNewNodeEatName() failed')
5166 __tmp = xmlNode(_obj=ret)
5169 def newNsProp(self, node, name, value):
5170 """Create a new property tagged with a namespace and carried
5172 if node is None: node__o = None
5173 else: node__o = node._o
5174 ret = libxml2mod.xmlNewNsProp(node__o, self._o, name, value)
5175 if ret is None:raise treeError('xmlNewNsProp() failed')
5176 __tmp = xmlAttr(_obj=ret)
5179 def newNsPropEatName(self, node, name, value):
5180 """Create a new property tagged with a namespace and carried
5182 if node is None: node__o = None
5183 else: node__o = node._o
5184 ret = libxml2mod.xmlNewNsPropEatName(node__o, self._o, name, value)
5185 if ret is None:raise treeError('xmlNewNsPropEatName() failed')
5186 __tmp = xmlAttr(_obj=ret)
5189 def newTextChild(self, parent, name, content):
5190 """Creation of a new child element, added at the end of
5191 @parent children list. @ns and @content parameters are
5192 optional (None). If @ns is None, the newly created element
5193 inherits the namespace of @parent. If @content is non None,
5194 a child TEXT node will be created containing the string
5195 @content. NOTE: Use xmlNewChild() if @content will contain
5196 entities that need to be preserved. Use this function,
5197 xmlNewTextChild(), if you need to ensure that reserved XML
5198 chars that might appear in @content, such as the ampersand,
5199 greater-than or less-than signs, are automatically replaced
5200 by their XML escaped entity representations. """
5201 if parent is None: parent__o = None
5202 else: parent__o = parent._o
5203 ret = libxml2mod.xmlNewTextChild(parent__o, self._o, name, content)
5204 if ret is None:raise treeError('xmlNewTextChild() failed')
5205 __tmp = xmlNode(_obj=ret)
5208 def setNs(self, node):
5209 """Associate a namespace to a node, a posteriori. """
5210 if node is None: node__o = None
5211 else: node__o = node._o
5212 libxml2mod.xmlSetNs(node__o, self._o)
5214 def setNsProp(self, node, name, value):
5215 """Set (or reset) an attribute carried by a node. The ns
5216 structure must be in scope, this is not checked """
5217 if node is None: node__o = None
5218 else: node__o = node._o
5219 ret = libxml2mod.xmlSetNsProp(node__o, self._o, name, value)
5220 if ret is None:raise treeError('xmlSetNsProp() failed')
5221 __tmp = xmlAttr(_obj=ret)
5224 def unsetNsProp(self, node, name):
5225 """Remove an attribute carried by a node. """
5226 if node is None: node__o = None
5227 else: node__o = node._o
5228 ret = libxml2mod.xmlUnsetNsProp(node__o, self._o, name)
5232 # xmlNs functions from module xpathInternals
5235 def xpathNodeSetFreeNs(self):
5236 """Namespace nodes in libxml don't match the XPath semantic.
5237 In a node set the namespace nodes are duplicated and the
5238 next pointer is set to the parent node in the XPath
5239 semantic. Check if such a node needs to be freed """
5240 libxml2mod.xmlXPathNodeSetFreeNs(self._o)
5242 class outputBuffer(ioWriteWrapper):
5243 def __init__(self, _obj=None):
5245 ioWriteWrapper.__init__(self, _obj=_obj)
5248 # outputBuffer functions from module HTMLtree
5251 def htmlDocContentDumpFormatOutput(self, cur, encoding, format):
5252 """Dump an HTML document. """
5253 if cur is None: cur__o = None
5254 else: cur__o = cur._o
5255 libxml2mod.htmlDocContentDumpFormatOutput(self._o, cur__o, encoding, format)
5257 def htmlDocContentDumpOutput(self, cur, encoding):
5258 """Dump an HTML document. Formating return/spaces are added. """
5259 if cur is None: cur__o = None
5260 else: cur__o = cur._o
5261 libxml2mod.htmlDocContentDumpOutput(self._o, cur__o, encoding)
5263 def htmlNodeDumpFormatOutput(self, doc, cur, encoding, format):
5264 """Dump an HTML node, recursive behaviour,children are printed
5266 if doc is None: doc__o = None
5267 else: doc__o = doc._o
5268 if cur is None: cur__o = None
5269 else: cur__o = cur._o
5270 libxml2mod.htmlNodeDumpFormatOutput(self._o, doc__o, cur__o, encoding, format)
5272 def htmlNodeDumpOutput(self, doc, cur, encoding):
5273 """Dump an HTML node, recursive behaviour,children are printed
5274 too, and formatting returns/spaces are added. """
5275 if doc is None: doc__o = None
5276 else: doc__o = doc._o
5277 if cur is None: cur__o = None
5278 else: cur__o = cur._o
5279 libxml2mod.htmlNodeDumpOutput(self._o, doc__o, cur__o, encoding)
5282 # outputBuffer functions from module tree
5285 def nodeDumpOutput(self, doc, cur, level, format, encoding):
5286 """Dump an XML node, recursive behaviour, children are printed
5287 too. Note that @format = 1 provide node indenting only if
5288 xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
5290 if doc is None: doc__o = None
5291 else: doc__o = doc._o
5292 if cur is None: cur__o = None
5293 else: cur__o = cur._o
5294 libxml2mod.xmlNodeDumpOutput(self._o, doc__o, cur__o, level, format, encoding)
5296 def saveFileTo(self, cur, encoding):
5297 """Dump an XML document to an I/O buffer. Warning ! This call
5298 xmlOutputBufferClose() on buf which is not available after
5300 if cur is None: cur__o = None
5301 else: cur__o = cur._o
5302 ret = libxml2mod.xmlSaveFileTo(self._o, cur__o, encoding)
5305 def saveFormatFileTo(self, cur, encoding, format):
5306 """Dump an XML document to an I/O buffer. Warning ! This call
5307 xmlOutputBufferClose() on buf which is not available after
5309 if cur is None: cur__o = None
5310 else: cur__o = cur._o
5311 ret = libxml2mod.xmlSaveFormatFileTo(self._o, cur__o, encoding, format)
5315 # outputBuffer functions from module xmlIO
5318 def getContent(self):
5319 """Gives a pointer to the data currently held in the output
5321 ret = libxml2mod.xmlOutputBufferGetContent(self._o)
5324 def write(self, len, buf):
5325 """Write the content of the array in the output I/O buffer
5326 This routine handle the I18N transcoding from internal
5327 UTF-8 The buffer is lossless, i.e. will store in case of
5328 partial or delayed writes. """
5329 ret = libxml2mod.xmlOutputBufferWrite(self._o, len, buf)
5332 def writeString(self, str):
5333 """Write the content of the string in the output I/O buffer
5334 This routine handle the I18N transcoding from internal
5335 UTF-8 The buffer is lossless, i.e. will store in case of
5336 partial or delayed writes. """
5337 ret = libxml2mod.xmlOutputBufferWriteString(self._o, str)
5340 class inputBuffer(ioReadWrapper):
5341 def __init__(self, _obj=None):
5343 ioReadWrapper.__init__(self, _obj=_obj)
5347 libxml2mod.xmlFreeParserInputBuffer(self._o)
5351 # inputBuffer functions from module xmlIO
5354 def grow(self, len):
5355 """Grow up the content of the input buffer, the old data are
5356 preserved This routine handle the I18N transcoding to
5357 internal UTF-8 This routine is used when operating the
5358 parser in normal (pull) mode TODO: one should be able to
5359 remove one extra copy by copying directly onto in->buffer
5361 ret = libxml2mod.xmlParserInputBufferGrow(self._o, len)
5364 def push(self, len, buf):
5365 """Push the content of the arry in the input buffer This
5366 routine handle the I18N transcoding to internal UTF-8 This
5367 is used when operating the parser in progressive (push)
5369 ret = libxml2mod.xmlParserInputBufferPush(self._o, len, buf)
5372 def read(self, len):
5373 """Refresh the content of the input buffer, the old data are
5374 considered consumed This routine handle the I18N
5375 transcoding to internal UTF-8 """
5376 ret = libxml2mod.xmlParserInputBufferRead(self._o, len)
5380 # inputBuffer functions from module xmlreader
5383 def Setup(self, reader, URL, encoding, options):
5384 """Setup an XML reader with new options """
5385 if reader is None: reader__o = None
5386 else: reader__o = reader._o
5387 ret = libxml2mod.xmlTextReaderSetup(reader__o, self._o, URL, encoding, options)
5390 def newTextReader(self, URI):
5391 """Create an xmlTextReader structure fed with @input """
5392 ret = libxml2mod.xmlNewTextReader(self._o, URI)
5393 if ret is None:raise treeError('xmlNewTextReader() failed')
5394 __tmp = xmlTextReader(_obj=ret)
5399 def __init__(self, _obj=None):
5400 if _obj != None:self._o = _obj;return
5405 libxml2mod.xmlRegFreeRegexp(self._o)
5409 # xmlReg functions from module xmlregexp
5412 def regexpExec(self, content):
5413 """Check if the regular expression generates the value """
5414 ret = libxml2mod.xmlRegexpExec(self._o, content)
5417 def regexpIsDeterminist(self):
5418 """Check if the regular expression is determinist """
5419 ret = libxml2mod.xmlRegexpIsDeterminist(self._o)
5422 def regexpPrint(self, output):
5423 """Print the content of the compiled regular expression """
5424 libxml2mod.xmlRegexpPrint(output, self._o)
5426 class relaxNgParserCtxt:
5427 def __init__(self, _obj=None):
5428 if _obj != None:self._o = _obj;return
5433 libxml2mod.xmlRelaxNGFreeParserCtxt(self._o)
5437 # relaxNgParserCtxt functions from module relaxng
5440 def relaxNGParse(self):
5441 """parse a schema definition resource and build an internal
5442 XML Shema struture which can be used to validate instances. """
5443 ret = libxml2mod.xmlRelaxNGParse(self._o)
5444 if ret is None:raise parserError('xmlRelaxNGParse() failed')
5445 __tmp = relaxNgSchema(_obj=ret)
5448 def relaxParserSetFlag(self, flags):
5449 """Semi private function used to pass informations to a parser
5450 context which are a combination of xmlRelaxNGParserFlag . """
5451 ret = libxml2mod.xmlRelaxParserSetFlag(self._o, flags)
5454 class relaxNgSchema:
5455 def __init__(self, _obj=None):
5456 if _obj != None:self._o = _obj;return
5461 libxml2mod.xmlRelaxNGFree(self._o)
5465 # relaxNgSchema functions from module relaxng
5468 def relaxNGDump(self, output):
5469 """Dump a RelaxNG structure back """
5470 libxml2mod.xmlRelaxNGDump(output, self._o)
5472 def relaxNGDumpTree(self, output):
5473 """Dump the transformed RelaxNG tree. """
5474 libxml2mod.xmlRelaxNGDumpTree(output, self._o)
5476 def relaxNGNewValidCtxt(self):
5477 """Create an XML RelaxNGs validation context based on the
5479 ret = libxml2mod.xmlRelaxNGNewValidCtxt(self._o)
5480 if ret is None:raise treeError('xmlRelaxNGNewValidCtxt() failed')
5481 __tmp = relaxNgValidCtxt(_obj=ret)
5486 # relaxNgSchema functions from module xmlreader
5489 def RelaxNGSetSchema(self, reader):
5490 """Use RelaxNG to validate the document as it is processed.
5491 Activation is only possible before the first Read(). if
5492 @schema is None, then RelaxNG validation is desactivated. @
5493 The @schema should not be freed until the reader is
5494 deallocated or its use has been deactivated. """
5495 if reader is None: reader__o = None
5496 else: reader__o = reader._o
5497 ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(reader__o, self._o)
5500 class relaxNgValidCtxt(relaxNgValidCtxtCore):
5501 def __init__(self, _obj=None):
5504 relaxNgValidCtxtCore.__init__(self, _obj=_obj)
5508 libxml2mod.xmlRelaxNGFreeValidCtxt(self._o)
5512 # relaxNgValidCtxt functions from module relaxng
5515 def relaxNGValidateDoc(self, doc):
5516 """Validate a document tree in memory. """
5517 if doc is None: doc__o = None
5518 else: doc__o = doc._o
5519 ret = libxml2mod.xmlRelaxNGValidateDoc(self._o, doc__o)
5522 def relaxNGValidateFullElement(self, doc, elem):
5523 """Validate a full subtree when
5524 xmlRelaxNGValidatePushElement() returned 0 and the content
5525 of the node has been expanded. """
5526 if doc is None: doc__o = None
5527 else: doc__o = doc._o
5528 if elem is None: elem__o = None
5529 else: elem__o = elem._o
5530 ret = libxml2mod.xmlRelaxNGValidateFullElement(self._o, doc__o, elem__o)
5533 def relaxNGValidatePopElement(self, doc, elem):
5534 """Pop the element end from the RelaxNG validation stack. """
5535 if doc is None: doc__o = None
5536 else: doc__o = doc._o
5537 if elem is None: elem__o = None
5538 else: elem__o = elem._o
5539 ret = libxml2mod.xmlRelaxNGValidatePopElement(self._o, doc__o, elem__o)
5542 def relaxNGValidatePushCData(self, data, len):
5543 """check the CData parsed for validation in the current stack """
5544 ret = libxml2mod.xmlRelaxNGValidatePushCData(self._o, data, len)
5547 def relaxNGValidatePushElement(self, doc, elem):
5548 """Push a new element start on the RelaxNG validation stack. """
5549 if doc is None: doc__o = None
5550 else: doc__o = doc._o
5551 if elem is None: elem__o = None
5552 else: elem__o = elem._o
5553 ret = libxml2mod.xmlRelaxNGValidatePushElement(self._o, doc__o, elem__o)
5557 # relaxNgValidCtxt functions from module xmlreader
5560 def RelaxNGValidateCtxt(self, reader, options):
5561 """Use RelaxNG schema context to validate the document as it
5562 is processed. Activation is only possible before the first
5563 Read(). If @ctxt is None, then RelaxNG schema validation is
5565 if reader is None: reader__o = None
5566 else: reader__o = reader._o
5567 ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(reader__o, self._o, options)
5570 class SchemaParserCtxt:
5571 def __init__(self, _obj=None):
5572 if _obj != None:self._o = _obj;return
5577 libxml2mod.xmlSchemaFreeParserCtxt(self._o)
5581 # SchemaParserCtxt functions from module xmlschemas
5584 def schemaParse(self):
5585 """parse a schema definition resource and build an internal
5586 XML Shema struture which can be used to validate instances. """
5587 ret = libxml2mod.xmlSchemaParse(self._o)
5588 if ret is None:raise parserError('xmlSchemaParse() failed')
5589 __tmp = Schema(_obj=ret)
5593 def __init__(self, _obj=None):
5594 if _obj != None:self._o = _obj;return
5599 libxml2mod.xmlSchemaFree(self._o)
5603 # Schema functions from module xmlreader
5606 def SetSchema(self, reader):
5607 """Use XSD Schema to validate the document as it is processed.
5608 Activation is only possible before the first Read(). if
5609 @schema is None, then Schema validation is desactivated. @
5610 The @schema should not be freed until the reader is
5611 deallocated or its use has been deactivated. """
5612 if reader is None: reader__o = None
5613 else: reader__o = reader._o
5614 ret = libxml2mod.xmlTextReaderSetSchema(reader__o, self._o)
5618 # Schema functions from module xmlschemas
5621 def schemaDump(self, output):
5622 """Dump a Schema structure. """
5623 libxml2mod.xmlSchemaDump(output, self._o)
5625 def schemaNewValidCtxt(self):
5626 """Create an XML Schemas validation context based on the given
5628 ret = libxml2mod.xmlSchemaNewValidCtxt(self._o)
5629 if ret is None:raise treeError('xmlSchemaNewValidCtxt() failed')
5630 __tmp = SchemaValidCtxt(_obj=ret)
5634 class SchemaValidCtxt(SchemaValidCtxtCore):
5635 def __init__(self, _obj=None):
5638 SchemaValidCtxtCore.__init__(self, _obj=_obj)
5642 libxml2mod.xmlSchemaFreeValidCtxt(self._o)
5646 # SchemaValidCtxt functions from module xmlreader
5649 def SchemaValidateCtxt(self, reader, options):
5650 """Use W3C XSD schema context to validate the document as it
5651 is processed. Activation is only possible before the first
5652 Read(). If @ctxt is None, then XML Schema validation is
5654 if reader is None: reader__o = None
5655 else: reader__o = reader._o
5656 ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(reader__o, self._o, options)
5660 # SchemaValidCtxt functions from module xmlschemas
5663 def schemaIsValid(self):
5664 """Check if any error was detected during validation. """
5665 ret = libxml2mod.xmlSchemaIsValid(self._o)
5668 def schemaSetValidOptions(self, options):
5669 """Sets the options to be used during the validation. """
5670 ret = libxml2mod.xmlSchemaSetValidOptions(self._o, options)
5673 def schemaValidCtxtGetOptions(self):
5674 """Get the validation context options. """
5675 ret = libxml2mod.xmlSchemaValidCtxtGetOptions(self._o)
5678 def schemaValidCtxtGetParserCtxt(self):
5679 """allow access to the parser context of the schema validation
5681 ret = libxml2mod.xmlSchemaValidCtxtGetParserCtxt(self._o)
5682 if ret is None:raise parserError('xmlSchemaValidCtxtGetParserCtxt() failed')
5683 __tmp = parserCtxt(_obj=ret)
5686 def schemaValidateDoc(self, doc):
5687 """Validate a document tree in memory. """
5688 if doc is None: doc__o = None
5689 else: doc__o = doc._o
5690 ret = libxml2mod.xmlSchemaValidateDoc(self._o, doc__o)
5693 def schemaValidateFile(self, filename, options):
5694 """Do a schemas validation of the given resource, it will use
5695 the SAX streamable validation internally. """
5696 ret = libxml2mod.xmlSchemaValidateFile(self._o, filename, options)
5699 def schemaValidateOneElement(self, elem):
5700 """Validate a branch of a tree, starting with the given @elem. """
5701 if elem is None: elem__o = None
5702 else: elem__o = elem._o
5703 ret = libxml2mod.xmlSchemaValidateOneElement(self._o, elem__o)
5706 def schemaValidateSetFilename(self, filename):
5707 """Workaround to provide file error reporting information when
5708 this is not provided by current APIs """
5709 libxml2mod.xmlSchemaValidateSetFilename(self._o, filename)
5711 class xmlTextReaderLocator:
5712 def __init__(self, _obj=None):
5713 if _obj != None:self._o = _obj;return
5717 # xmlTextReaderLocator functions from module xmlreader
5721 """Obtain the base URI for the given locator. """
5722 ret = libxml2mod.xmlTextReaderLocatorBaseURI(self._o)
5725 def LineNumber(self):
5726 """Obtain the line number for the given locator. """
5727 ret = libxml2mod.xmlTextReaderLocatorLineNumber(self._o)
5730 class xmlTextReader(xmlTextReaderCore):
5731 def __init__(self, _obj=None):
5734 xmlTextReaderCore.__init__(self, _obj=_obj)
5738 libxml2mod.xmlFreeTextReader(self._o)
5742 # xmlTextReader functions from module xmlreader
5745 def AttributeCount(self):
5746 """Provides the number of attributes of the current node """
5747 ret = libxml2mod.xmlTextReaderAttributeCount(self._o)
5751 """The base URI of the node. """
5752 ret = libxml2mod.xmlTextReaderConstBaseUri(self._o)
5755 def ByteConsumed(self):
5756 """This function provides the current index of the parser used
5757 by the reader, relative to the start of the current entity.
5758 This function actually just wraps a call to
5759 xmlBytesConsumed() for the parser context associated with
5760 the reader. See xmlBytesConsumed() for more information. """
5761 ret = libxml2mod.xmlTextReaderByteConsumed(self._o)
5765 """This method releases any resources allocated by the current
5766 instance changes the state to Closed and close any
5767 underlying input. """
5768 ret = libxml2mod.xmlTextReaderClose(self._o)
5771 def CurrentDoc(self):
5772 """Hacking interface allowing to get the xmlDocPtr
5773 correponding to the current document being accessed by the
5774 xmlTextReader. NOTE: as a result of this call, the reader
5775 will not destroy the associated XML document and calling
5776 xmlFreeDoc() on the result is needed once the reader
5777 parsing has finished. """
5778 ret = libxml2mod.xmlTextReaderCurrentDoc(self._o)
5779 if ret is None:raise treeError('xmlTextReaderCurrentDoc() failed')
5780 __tmp = xmlDoc(_obj=ret)
5783 def CurrentNode(self):
5784 """Hacking interface allowing to get the xmlNodePtr
5785 correponding to the current node being accessed by the
5786 xmlTextReader. This is dangerous because the underlying
5787 node may be destroyed on the next Reads. """
5788 ret = libxml2mod.xmlTextReaderCurrentNode(self._o)
5789 if ret is None:raise treeError('xmlTextReaderCurrentNode() failed')
5790 __tmp = xmlNode(_obj=ret)
5794 """The depth of the node in the tree. """
5795 ret = libxml2mod.xmlTextReaderDepth(self._o)
5799 """Determine the encoding of the document being read. """
5800 ret = libxml2mod.xmlTextReaderConstEncoding(self._o)
5804 """Reads the contents of the current node and the full
5805 subtree. It then makes the subtree available until the next
5806 xmlTextReaderRead() call """
5807 ret = libxml2mod.xmlTextReaderExpand(self._o)
5808 if ret is None:raise treeError('xmlTextReaderExpand() failed')
5809 __tmp = xmlNode(_obj=ret)
5812 def GetAttribute(self, name):
5813 """Provides the value of the attribute with the specified
5815 ret = libxml2mod.xmlTextReaderGetAttribute(self._o, name)
5818 def GetAttributeNo(self, no):
5819 """Provides the value of the attribute with the specified
5820 index relative to the containing element. """
5821 ret = libxml2mod.xmlTextReaderGetAttributeNo(self._o, no)
5824 def GetAttributeNs(self, localName, namespaceURI):
5825 """Provides the value of the specified attribute """
5826 ret = libxml2mod.xmlTextReaderGetAttributeNs(self._o, localName, namespaceURI)
5829 def GetParserColumnNumber(self):
5830 """Provide the column number of the current parsing point. """
5831 ret = libxml2mod.xmlTextReaderGetParserColumnNumber(self._o)
5834 def GetParserLineNumber(self):
5835 """Provide the line number of the current parsing point. """
5836 ret = libxml2mod.xmlTextReaderGetParserLineNumber(self._o)
5839 def GetParserProp(self, prop):
5840 """Read the parser internal property. """
5841 ret = libxml2mod.xmlTextReaderGetParserProp(self._o, prop)
5844 def GetRemainder(self):
5845 """Method to get the remainder of the buffered XML. this
5846 method stops the parser, set its state to End Of File and
5847 return the input stream with what is left that the parser
5848 did not use. The implementation is not good, the parser
5849 certainly procgressed past what's left in reader->input,
5850 and there is an allocation problem. Best would be to
5851 rewrite it differently. """
5852 ret = libxml2mod.xmlTextReaderGetRemainder(self._o)
5853 if ret is None:raise treeError('xmlTextReaderGetRemainder() failed')
5854 __tmp = inputBuffer(_obj=ret)
5857 def HasAttributes(self):
5858 """Whether the node has attributes. """
5859 ret = libxml2mod.xmlTextReaderHasAttributes(self._o)
5863 """Whether the node can have a text value. """
5864 ret = libxml2mod.xmlTextReaderHasValue(self._o)
5867 def IsDefault(self):
5868 """Whether an Attribute node was generated from the default
5869 value defined in the DTD or schema. """
5870 ret = libxml2mod.xmlTextReaderIsDefault(self._o)
5873 def IsEmptyElement(self):
5874 """Check if the current node is empty """
5875 ret = libxml2mod.xmlTextReaderIsEmptyElement(self._o)
5878 def IsNamespaceDecl(self):
5879 """Determine whether the current node is a namespace
5880 declaration rather than a regular attribute. """
5881 ret = libxml2mod.xmlTextReaderIsNamespaceDecl(self._o)
5885 """Retrieve the validity status from the parser context """
5886 ret = libxml2mod.xmlTextReaderIsValid(self._o)
5889 def LocalName(self):
5890 """The local name of the node. """
5891 ret = libxml2mod.xmlTextReaderConstLocalName(self._o)
5894 def LookupNamespace(self, prefix):
5895 """Resolves a namespace prefix in the scope of the current
5897 ret = libxml2mod.xmlTextReaderLookupNamespace(self._o, prefix)
5900 def MoveToAttribute(self, name):
5901 """Moves the position of the current instance to the attribute
5902 with the specified qualified name. """
5903 ret = libxml2mod.xmlTextReaderMoveToAttribute(self._o, name)
5906 def MoveToAttributeNo(self, no):
5907 """Moves the position of the current instance to the attribute
5908 with the specified index relative to the containing element. """
5909 ret = libxml2mod.xmlTextReaderMoveToAttributeNo(self._o, no)
5912 def MoveToAttributeNs(self, localName, namespaceURI):
5913 """Moves the position of the current instance to the attribute
5914 with the specified local name and namespace URI. """
5915 ret = libxml2mod.xmlTextReaderMoveToAttributeNs(self._o, localName, namespaceURI)
5918 def MoveToElement(self):
5919 """Moves the position of the current instance to the node that
5920 contains the current Attribute node. """
5921 ret = libxml2mod.xmlTextReaderMoveToElement(self._o)
5924 def MoveToFirstAttribute(self):
5925 """Moves the position of the current instance to the first
5926 attribute associated with the current node. """
5927 ret = libxml2mod.xmlTextReaderMoveToFirstAttribute(self._o)
5930 def MoveToNextAttribute(self):
5931 """Moves the position of the current instance to the next
5932 attribute associated with the current node. """
5933 ret = libxml2mod.xmlTextReaderMoveToNextAttribute(self._o)
5937 """The qualified name of the node, equal to Prefix :LocalName. """
5938 ret = libxml2mod.xmlTextReaderConstName(self._o)
5941 def NamespaceUri(self):
5942 """The URI defining the namespace associated with the node. """
5943 ret = libxml2mod.xmlTextReaderConstNamespaceUri(self._o)
5946 def NewDoc(self, cur, URL, encoding, options):
5947 """Setup an xmltextReader to parse an XML in-memory document.
5948 The parsing flags @options are a combination of
5949 xmlParserOption. This reuses the existing @reader
5951 ret = libxml2mod.xmlReaderNewDoc(self._o, cur, URL, encoding, options)
5954 def NewFd(self, fd, URL, encoding, options):
5955 """Setup an xmltextReader to parse an XML from a file
5956 descriptor. NOTE that the file descriptor will not be
5957 closed when the reader is closed or reset. The parsing
5958 flags @options are a combination of xmlParserOption. This
5959 reuses the existing @reader xmlTextReader. """
5960 ret = libxml2mod.xmlReaderNewFd(self._o, fd, URL, encoding, options)
5963 def NewFile(self, filename, encoding, options):
5964 """parse an XML file from the filesystem or the network. The
5965 parsing flags @options are a combination of
5966 xmlParserOption. This reuses the existing @reader
5968 ret = libxml2mod.xmlReaderNewFile(self._o, filename, encoding, options)
5971 def NewMemory(self, buffer, size, URL, encoding, options):
5972 """Setup an xmltextReader to parse an XML in-memory document.
5973 The parsing flags @options are a combination of
5974 xmlParserOption. This reuses the existing @reader
5976 ret = libxml2mod.xmlReaderNewMemory(self._o, buffer, size, URL, encoding, options)
5979 def NewWalker(self, doc):
5980 """Setup an xmltextReader to parse a preparsed XML document.
5981 This reuses the existing @reader xmlTextReader. """
5982 if doc is None: doc__o = None
5983 else: doc__o = doc._o
5984 ret = libxml2mod.xmlReaderNewWalker(self._o, doc__o)
5988 """Skip to the node following the current one in document
5989 order while avoiding the subtree if any. """
5990 ret = libxml2mod.xmlTextReaderNext(self._o)
5993 def NextSibling(self):
5994 """Skip to the node following the current one in document
5995 order while avoiding the subtree if any. Currently
5996 implemented only for Readers built on a document """
5997 ret = libxml2mod.xmlTextReaderNextSibling(self._o)
6001 """Get the node type of the current node Reference:
6002 http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/Xm
6004 ret = libxml2mod.xmlTextReaderNodeType(self._o)
6007 def Normalization(self):
6008 """The value indicating whether to normalize white space and
6009 attribute values. Since attribute value and end of line
6010 normalizations are a MUST in the XML specification only the
6011 value true is accepted. The broken bahaviour of accepting
6012 out of range character entities like � is of course not
6013 supported either. """
6014 ret = libxml2mod.xmlTextReaderNormalization(self._o)
6018 """A shorthand reference to the namespace associated with the
6020 ret = libxml2mod.xmlTextReaderConstPrefix(self._o)
6024 """This tells the XML Reader to preserve the current node. The
6025 caller must also use xmlTextReaderCurrentDoc() to keep an
6026 handle on the resulting document once parsing has finished """
6027 ret = libxml2mod.xmlTextReaderPreserve(self._o)
6028 if ret is None:raise treeError('xmlTextReaderPreserve() failed')
6029 __tmp = xmlNode(_obj=ret)
6032 def QuoteChar(self):
6033 """The quotation mark character used to enclose the value of
6035 ret = libxml2mod.xmlTextReaderQuoteChar(self._o)
6039 """Moves the position of the current instance to the next node
6040 in the stream, exposing its properties. """
6041 ret = libxml2mod.xmlTextReaderRead(self._o)
6044 def ReadAttributeValue(self):
6045 """Parses an attribute value into one or more Text and
6046 EntityReference nodes. """
6047 ret = libxml2mod.xmlTextReaderReadAttributeValue(self._o)
6050 def ReadInnerXml(self):
6051 """Reads the contents of the current node, including child
6052 nodes and markup. """
6053 ret = libxml2mod.xmlTextReaderReadInnerXml(self._o)
6056 def ReadOuterXml(self):
6057 """Reads the contents of the current node, including child
6058 nodes and markup. """
6059 ret = libxml2mod.xmlTextReaderReadOuterXml(self._o)
6062 def ReadState(self):
6063 """Gets the read state of the reader. """
6064 ret = libxml2mod.xmlTextReaderReadState(self._o)
6067 def ReadString(self):
6068 """Reads the contents of an element or a text node as a string. """
6069 ret = libxml2mod.xmlTextReaderReadString(self._o)
6072 def RelaxNGSetSchema(self, schema):
6073 """Use RelaxNG to validate the document as it is processed.
6074 Activation is only possible before the first Read(). if
6075 @schema is None, then RelaxNG validation is desactivated. @
6076 The @schema should not be freed until the reader is
6077 deallocated or its use has been deactivated. """
6078 if schema is None: schema__o = None
6079 else: schema__o = schema._o
6080 ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(self._o, schema__o)
6083 def RelaxNGValidate(self, rng):
6084 """Use RelaxNG schema to validate the document as it is
6085 processed. Activation is only possible before the first
6086 Read(). If @rng is None, then RelaxNG schema validation is
6088 ret = libxml2mod.xmlTextReaderRelaxNGValidate(self._o, rng)
6091 def RelaxNGValidateCtxt(self, ctxt, options):
6092 """Use RelaxNG schema context to validate the document as it
6093 is processed. Activation is only possible before the first
6094 Read(). If @ctxt is None, then RelaxNG schema validation is
6096 if ctxt is None: ctxt__o = None
6097 else: ctxt__o = ctxt._o
6098 ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(self._o, ctxt__o, options)
6101 def SchemaValidate(self, xsd):
6102 """Use W3C XSD schema to validate the document as it is
6103 processed. Activation is only possible before the first
6104 Read(). If @xsd is None, then XML Schema validation is
6106 ret = libxml2mod.xmlTextReaderSchemaValidate(self._o, xsd)
6109 def SchemaValidateCtxt(self, ctxt, options):
6110 """Use W3C XSD schema context to validate the document as it
6111 is processed. Activation is only possible before the first
6112 Read(). If @ctxt is None, then XML Schema validation is
6114 if ctxt is None: ctxt__o = None
6115 else: ctxt__o = ctxt._o
6116 ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(self._o, ctxt__o, options)
6119 def SetParserProp(self, prop, value):
6120 """Change the parser processing behaviour by changing some of
6121 its internal properties. Note that some properties can only
6122 be changed before any read has been done. """
6123 ret = libxml2mod.xmlTextReaderSetParserProp(self._o, prop, value)
6126 def SetSchema(self, schema):
6127 """Use XSD Schema to validate the document as it is processed.
6128 Activation is only possible before the first Read(). if
6129 @schema is None, then Schema validation is desactivated. @
6130 The @schema should not be freed until the reader is
6131 deallocated or its use has been deactivated. """
6132 if schema is None: schema__o = None
6133 else: schema__o = schema._o
6134 ret = libxml2mod.xmlTextReaderSetSchema(self._o, schema__o)
6137 def Setup(self, input, URL, encoding, options):
6138 """Setup an XML reader with new options """
6139 if input is None: input__o = None
6140 else: input__o = input._o
6141 ret = libxml2mod.xmlTextReaderSetup(self._o, input__o, URL, encoding, options)
6144 def Standalone(self):
6145 """Determine the standalone status of the document being read. """
6146 ret = libxml2mod.xmlTextReaderStandalone(self._o)
6149 def String(self, str):
6150 """Get an interned string from the reader, allows for example
6151 to speedup string name comparisons """
6152 ret = libxml2mod.xmlTextReaderConstString(self._o, str)
6156 """Provides the text value of the node if present """
6157 ret = libxml2mod.xmlTextReaderConstValue(self._o)
6161 """The xml:lang scope within which the node resides. """
6162 ret = libxml2mod.xmlTextReaderConstXmlLang(self._o)
6165 def XmlVersion(self):
6166 """Determine the XML version of the document being read. """
6167 ret = libxml2mod.xmlTextReaderConstXmlVersion(self._o)
6171 def __init__(self, _obj=None):
6172 if _obj != None:self._o = _obj;return
6177 libxml2mod.xmlFreeURI(self._o)
6181 def authority(self):
6182 """Get the authority part from an URI """
6183 ret = libxml2mod.xmlURIGetAuthority(self._o)
6187 """Get the fragment part from an URI """
6188 ret = libxml2mod.xmlURIGetFragment(self._o)
6192 """Get the opaque part from an URI """
6193 ret = libxml2mod.xmlURIGetOpaque(self._o)
6197 """Get the path part from an URI """
6198 ret = libxml2mod.xmlURIGetPath(self._o)
6202 """Get the port part from an URI """
6203 ret = libxml2mod.xmlURIGetPort(self._o)
6207 """Get the query part from an URI """
6208 ret = libxml2mod.xmlURIGetQuery(self._o)
6212 """Get the raw query part from an URI (i.e. the unescaped
6214 ret = libxml2mod.xmlURIGetQueryRaw(self._o)
6218 """Get the scheme part from an URI """
6219 ret = libxml2mod.xmlURIGetScheme(self._o)
6223 """Get the server part from an URI """
6224 ret = libxml2mod.xmlURIGetServer(self._o)
6227 def setAuthority(self, authority):
6228 """Set the authority part of an URI. """
6229 libxml2mod.xmlURISetAuthority(self._o, authority)
6231 def setFragment(self, fragment):
6232 """Set the fragment part of an URI. """
6233 libxml2mod.xmlURISetFragment(self._o, fragment)
6235 def setOpaque(self, opaque):
6236 """Set the opaque part of an URI. """
6237 libxml2mod.xmlURISetOpaque(self._o, opaque)
6239 def setPath(self, path):
6240 """Set the path part of an URI. """
6241 libxml2mod.xmlURISetPath(self._o, path)
6243 def setPort(self, port):
6244 """Set the port part of an URI. """
6245 libxml2mod.xmlURISetPort(self._o, port)
6247 def setQuery(self, query):
6248 """Set the query part of an URI. """
6249 libxml2mod.xmlURISetQuery(self._o, query)
6251 def setQueryRaw(self, query_raw):
6252 """Set the raw query part of an URI (i.e. the unescaped form). """
6253 libxml2mod.xmlURISetQueryRaw(self._o, query_raw)
6255 def setScheme(self, scheme):
6256 """Set the scheme part of an URI. """
6257 libxml2mod.xmlURISetScheme(self._o, scheme)
6259 def setServer(self, server):
6260 """Set the server part of an URI. """
6261 libxml2mod.xmlURISetServer(self._o, server)
6263 def setUser(self, user):
6264 """Set the user part of an URI. """
6265 libxml2mod.xmlURISetUser(self._o, user)
6268 """Get the user part from an URI """
6269 ret = libxml2mod.xmlURIGetUser(self._o)
6273 # URI functions from module uri
6276 def parseURIReference(self, str):
6277 """Parse an URI reference string based on RFC 3986 and fills
6278 in the appropriate fields of the @uri structure
6279 URI-reference = URI / relative-ref """
6280 ret = libxml2mod.xmlParseURIReference(self._o, str)
6283 def printURI(self, stream):
6284 """Prints the URI in the stream @stream. """
6285 libxml2mod.xmlPrintURI(stream, self._o)
6288 """Save the URI as an escaped string """
6289 ret = libxml2mod.xmlSaveUri(self._o)
6292 class ValidCtxt(ValidCtxtCore):
6293 def __init__(self, _obj=None):
6295 ValidCtxtCore.__init__(self, _obj=_obj)
6299 libxml2mod.xmlFreeValidCtxt(self._o)
6303 # ValidCtxt functions from module valid
6306 def validCtxtNormalizeAttributeValue(self, doc, elem, name, value):
6307 """Does the validation related extra step of the normalization
6308 of attribute values: If the declared value is not CDATA,
6309 then the XML processor must further process the normalized
6310 attribute value by discarding any leading and trailing
6311 space (#x20) characters, and by replacing sequences of
6312 space (#x20) characters by single space (#x20) character.
6313 Also check VC: Standalone Document Declaration in P32, and
6314 update ctxt->valid accordingly """
6315 if doc is None: doc__o = None
6316 else: doc__o = doc._o
6317 if elem is None: elem__o = None
6318 else: elem__o = elem._o
6319 ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(self._o, doc__o, elem__o, name, value)
6322 def validateDocument(self, doc):
6323 """Try to validate the document instance basically it does
6324 the all the checks described by the XML Rec i.e. validates
6325 the internal and external subset (if present) and validate
6326 the document tree. """
6327 if doc is None: doc__o = None
6328 else: doc__o = doc._o
6329 ret = libxml2mod.xmlValidateDocument(self._o, doc__o)
6332 def validateDocumentFinal(self, doc):
6333 """Does the final step for the document validation once all
6334 the incremental validation steps have been completed
6335 basically it does the following checks described by the XML
6336 Rec Check all the IDREF/IDREFS attributes definition for
6338 if doc is None: doc__o = None
6339 else: doc__o = doc._o
6340 ret = libxml2mod.xmlValidateDocumentFinal(self._o, doc__o)
6343 def validateDtd(self, doc, dtd):
6344 """Try to validate the document against the dtd instance
6345 Basically it does check all the definitions in the DtD.
6346 Note the the internal subset (if present) is de-coupled
6347 (i.e. not used), which could give problems if ID or IDREF
6349 if doc is None: doc__o = None
6350 else: doc__o = doc._o
6351 if dtd is None: dtd__o = None
6352 else: dtd__o = dtd._o
6353 ret = libxml2mod.xmlValidateDtd(self._o, doc__o, dtd__o)
6356 def validateDtdFinal(self, doc):
6357 """Does the final step for the dtds validation once all the
6358 subsets have been parsed basically it does the following
6359 checks described by the XML Rec - check that ENTITY and
6360 ENTITIES type attributes default or possible values matches
6361 one of the defined entities. - check that NOTATION type
6362 attributes default or possible values matches one of the
6363 defined notations. """
6364 if doc is None: doc__o = None
6365 else: doc__o = doc._o
6366 ret = libxml2mod.xmlValidateDtdFinal(self._o, doc__o)
6369 def validateElement(self, doc, elem):
6370 """Try to validate the subtree under an element """
6371 if doc is None: doc__o = None
6372 else: doc__o = doc._o
6373 if elem is None: elem__o = None
6374 else: elem__o = elem._o
6375 ret = libxml2mod.xmlValidateElement(self._o, doc__o, elem__o)
6378 def validateNotationUse(self, doc, notationName):
6379 """Validate that the given name match a notation declaration.
6380 - [ VC: Notation Declared ] """
6381 if doc is None: doc__o = None
6382 else: doc__o = doc._o
6383 ret = libxml2mod.xmlValidateNotationUse(self._o, doc__o, notationName)
6386 def validateOneAttribute(self, doc, elem, attr, value):
6387 """Try to validate a single attribute for an element basically
6388 it does the following checks as described by the XML-1.0
6389 recommendation: - [ VC: Attribute Value Type ] - [ VC:
6390 Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
6391 Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
6392 Name ] - [ VC: Notation Attributes ] The ID/IDREF
6393 uniqueness and matching are done separately """
6394 if doc is None: doc__o = None
6395 else: doc__o = doc._o
6396 if elem is None: elem__o = None
6397 else: elem__o = elem._o
6398 if attr is None: attr__o = None
6399 else: attr__o = attr._o
6400 ret = libxml2mod.xmlValidateOneAttribute(self._o, doc__o, elem__o, attr__o, value)
6403 def validateOneElement(self, doc, elem):
6404 """Try to validate a single element and it's attributes,
6405 basically it does the following checks as described by the
6406 XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
6407 Required Attribute ] Then call xmlValidateOneAttribute()
6408 for each attribute present. The ID/IDREF checkings are
6410 if doc is None: doc__o = None
6411 else: doc__o = doc._o
6412 if elem is None: elem__o = None
6413 else: elem__o = elem._o
6414 ret = libxml2mod.xmlValidateOneElement(self._o, doc__o, elem__o)
6417 def validateOneNamespace(self, doc, elem, prefix, ns, value):
6418 """Try to validate a single namespace declaration for an
6419 element basically it does the following checks as described
6420 by the XML-1.0 recommendation: - [ VC: Attribute Value Type
6421 ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
6422 [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
6423 Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
6424 uniqueness and matching are done separately """
6425 if doc is None: doc__o = None
6426 else: doc__o = doc._o
6427 if elem is None: elem__o = None
6428 else: elem__o = elem._o
6429 if ns is None: ns__o = None
6431 ret = libxml2mod.xmlValidateOneNamespace(self._o, doc__o, elem__o, prefix, ns__o, value)
6434 def validatePopElement(self, doc, elem, qname):
6435 """Pop the element end from the validation stack. """
6436 if doc is None: doc__o = None
6437 else: doc__o = doc._o
6438 if elem is None: elem__o = None
6439 else: elem__o = elem._o
6440 ret = libxml2mod.xmlValidatePopElement(self._o, doc__o, elem__o, qname)
6443 def validatePushCData(self, data, len):
6444 """check the CData parsed for validation in the current stack """
6445 ret = libxml2mod.xmlValidatePushCData(self._o, data, len)
6448 def validatePushElement(self, doc, elem, qname):
6449 """Push a new element start on the validation stack. """
6450 if doc is None: doc__o = None
6451 else: doc__o = doc._o
6452 if elem is None: elem__o = None
6453 else: elem__o = elem._o
6454 ret = libxml2mod.xmlValidatePushElement(self._o, doc__o, elem__o, qname)
6457 def validateRoot(self, doc):
6458 """Try to validate a the root element basically it does the
6459 following check as described by the XML-1.0 recommendation:
6460 - [ VC: Root Element Type ] it doesn't try to recurse or
6461 apply other check to the element """
6462 if doc is None: doc__o = None
6463 else: doc__o = doc._o
6464 ret = libxml2mod.xmlValidateRoot(self._o, doc__o)
6468 def __init__(self, _obj=None):
6469 if _obj != None:self._o = _obj;return
6472 # accessors for xpathContext
6473 def contextDoc(self):
6474 """Get the doc from an xpathContext """
6475 ret = libxml2mod.xmlXPathGetContextDoc(self._o)
6476 if ret is None:raise xpathError('xmlXPathGetContextDoc() failed')
6477 __tmp = xmlDoc(_obj=ret)
6480 def contextNode(self):
6481 """Get the current node from an xpathContext """
6482 ret = libxml2mod.xmlXPathGetContextNode(self._o)
6483 if ret is None:raise xpathError('xmlXPathGetContextNode() failed')
6484 __tmp = xmlNode(_obj=ret)
6487 def contextPosition(self):
6488 """Get the current node from an xpathContext """
6489 ret = libxml2mod.xmlXPathGetContextPosition(self._o)
6492 def contextSize(self):
6493 """Get the current node from an xpathContext """
6494 ret = libxml2mod.xmlXPathGetContextSize(self._o)
6498 """Get the current function name xpathContext """
6499 ret = libxml2mod.xmlXPathGetFunction(self._o)
6502 def functionURI(self):
6503 """Get the current function name URI xpathContext """
6504 ret = libxml2mod.xmlXPathGetFunctionURI(self._o)
6507 def setContextDoc(self, doc):
6508 """Set the doc of an xpathContext """
6509 if doc is None: doc__o = None
6510 else: doc__o = doc._o
6511 libxml2mod.xmlXPathSetContextDoc(self._o, doc__o)
6513 def setContextNode(self, node):
6514 """Set the current node of an xpathContext """
6515 if node is None: node__o = None
6516 else: node__o = node._o
6517 libxml2mod.xmlXPathSetContextNode(self._o, node__o)
6520 # xpathContext functions from module python
6523 def registerXPathFunction(self, name, ns_uri, f):
6524 """Register a Python written function to the XPath interpreter """
6525 ret = libxml2mod.xmlRegisterXPathFunction(self._o, name, ns_uri, f)
6528 def xpathRegisterVariable(self, name, ns_uri, value):
6529 """Register a variable with the XPath context """
6530 ret = libxml2mod.xmlXPathRegisterVariable(self._o, name, ns_uri, value)
6534 # xpathContext functions from module xpath
6537 def xpathContextSetCache(self, active, value, options):
6538 """Creates/frees an object cache on the XPath context. If
6539 activates XPath objects (xmlXPathObject) will be cached
6540 internally to be reused. @options: 0: This will set the
6541 XPath object caching: @value: This will set the maximum
6542 number of XPath objects to be cached per slot There are 5
6543 slots for: node-set, string, number, boolean, and misc
6544 objects. Use <0 for the default number (100). Other values
6545 for @options have currently no effect. """
6546 ret = libxml2mod.xmlXPathContextSetCache(self._o, active, value, options)
6549 def xpathEval(self, str):
6550 """Evaluate the XPath Location Path in the given context. """
6551 ret = libxml2mod.xmlXPathEval(str, self._o)
6552 if ret is None:raise xpathError('xmlXPathEval() failed')
6553 return xpathObjectRet(ret)
6555 def xpathEvalExpression(self, str):
6556 """Alias for xmlXPathEval(). """
6557 ret = libxml2mod.xmlXPathEvalExpression(str, self._o)
6558 if ret is None:raise xpathError('xmlXPathEvalExpression() failed')
6559 return xpathObjectRet(ret)
6561 def xpathFreeContext(self):
6562 """Free up an xmlXPathContext """
6563 libxml2mod.xmlXPathFreeContext(self._o)
6566 # xpathContext functions from module xpathInternals
6569 def xpathNewParserContext(self, str):
6570 """Create a new xmlXPathParserContext """
6571 ret = libxml2mod.xmlXPathNewParserContext(str, self._o)
6572 if ret is None:raise xpathError('xmlXPathNewParserContext() failed')
6573 __tmp = xpathParserContext(_obj=ret)
6576 def xpathNsLookup(self, prefix):
6577 """Search in the namespace declaration array of the context
6578 for the given namespace name associated to the given prefix """
6579 ret = libxml2mod.xmlXPathNsLookup(self._o, prefix)
6582 def xpathRegisterAllFunctions(self):
6583 """Registers all default XPath functions in this context """
6584 libxml2mod.xmlXPathRegisterAllFunctions(self._o)
6586 def xpathRegisterNs(self, prefix, ns_uri):
6587 """Register a new namespace. If @ns_uri is None it unregisters
6589 ret = libxml2mod.xmlXPathRegisterNs(self._o, prefix, ns_uri)
6592 def xpathRegisteredFuncsCleanup(self):
6593 """Cleanup the XPath context data associated to registered
6595 libxml2mod.xmlXPathRegisteredFuncsCleanup(self._o)
6597 def xpathRegisteredNsCleanup(self):
6598 """Cleanup the XPath context data associated to registered
6600 libxml2mod.xmlXPathRegisteredNsCleanup(self._o)
6602 def xpathRegisteredVariablesCleanup(self):
6603 """Cleanup the XPath context data associated to registered
6605 libxml2mod.xmlXPathRegisteredVariablesCleanup(self._o)
6607 def xpathVariableLookup(self, name):
6608 """Search in the Variable array of the context for the given
6610 ret = libxml2mod.xmlXPathVariableLookup(self._o, name)
6611 if ret is None:raise xpathError('xmlXPathVariableLookup() failed')
6612 return xpathObjectRet(ret)
6614 def xpathVariableLookupNS(self, name, ns_uri):
6615 """Search in the Variable array of the context for the given
6617 ret = libxml2mod.xmlXPathVariableLookupNS(self._o, name, ns_uri)
6618 if ret is None:raise xpathError('xmlXPathVariableLookupNS() failed')
6619 return xpathObjectRet(ret)
6622 # xpathContext functions from module xpointer
6625 def xpointerEval(self, str):
6626 """Evaluate the XPath Location Path in the given context. """
6627 ret = libxml2mod.xmlXPtrEval(str, self._o)
6628 if ret is None:raise treeError('xmlXPtrEval() failed')
6629 return xpathObjectRet(ret)
6631 class xpathParserContext:
6632 def __init__(self, _obj=None):
6633 if _obj != None:self._o = _obj;return
6636 # accessors for xpathParserContext
6638 """Get the xpathContext from an xpathParserContext """
6639 ret = libxml2mod.xmlXPathParserGetContext(self._o)
6640 if ret is None:raise xpathError('xmlXPathParserGetContext() failed')
6641 __tmp = xpathContext(_obj=ret)
6645 # xpathParserContext functions from module xpathInternals
6648 def xpathAddValues(self):
6649 """Implement the add operation on XPath objects: The numeric
6650 operators convert their operands to numbers as if by
6651 calling the number function. """
6652 libxml2mod.xmlXPathAddValues(self._o)
6654 def xpathBooleanFunction(self, nargs):
6655 """Implement the boolean() XPath function boolean
6656 boolean(object) The boolean function converts its argument
6657 to a boolean as follows: - a number is true if and only if
6658 it is neither positive or negative zero nor NaN - a
6659 node-set is true if and only if it is non-empty - a string
6660 is true if and only if its length is non-zero """
6661 libxml2mod.xmlXPathBooleanFunction(self._o, nargs)
6663 def xpathCeilingFunction(self, nargs):
6664 """Implement the ceiling() XPath function number
6665 ceiling(number) The ceiling function returns the smallest
6666 (closest to negative infinity) number that is not less than
6667 the argument and that is an integer. """
6668 libxml2mod.xmlXPathCeilingFunction(self._o, nargs)
6670 def xpathCompareValues(self, inf, strict):
6671 """Implement the compare operation on XPath objects: @arg1 <
6672 @arg2 (1, 1, ... @arg1 <= @arg2 (1, 0, ... @arg1 >
6673 @arg2 (0, 1, ... @arg1 >= @arg2 (0, 0, ... When
6674 neither object to be compared is a node-set and the
6675 operator is <=, <, >=, >, then the objects are compared by
6676 converted both objects to numbers and comparing the numbers
6677 according to IEEE 754. The < comparison will be true if and
6678 only if the first number is less than the second number.
6679 The <= comparison will be true if and only if the first
6680 number is less than or equal to the second number. The >
6681 comparison will be true if and only if the first number is
6682 greater than the second number. The >= comparison will be
6683 true if and only if the first number is greater than or
6684 equal to the second number. """
6685 ret = libxml2mod.xmlXPathCompareValues(self._o, inf, strict)
6688 def xpathConcatFunction(self, nargs):
6689 """Implement the concat() XPath function string concat(string,
6690 string, string*) The concat function returns the
6691 concatenation of its arguments. """
6692 libxml2mod.xmlXPathConcatFunction(self._o, nargs)
6694 def xpathContainsFunction(self, nargs):
6695 """Implement the contains() XPath function boolean
6696 contains(string, string) The contains function returns true
6697 if the first argument string contains the second argument
6698 string, and otherwise returns false. """
6699 libxml2mod.xmlXPathContainsFunction(self._o, nargs)
6701 def xpathCountFunction(self, nargs):
6702 """Implement the count() XPath function number count(node-set) """
6703 libxml2mod.xmlXPathCountFunction(self._o, nargs)
6705 def xpathDivValues(self):
6706 """Implement the div operation on XPath objects @arg1 / @arg2:
6707 The numeric operators convert their operands to numbers as
6708 if by calling the number function. """
6709 libxml2mod.xmlXPathDivValues(self._o)
6711 def xpathEqualValues(self):
6712 """Implement the equal operation on XPath objects content:
6714 ret = libxml2mod.xmlXPathEqualValues(self._o)
6717 def xpathErr(self, error):
6718 """Handle an XPath error """
6719 libxml2mod.xmlXPathErr(self._o, error)
6721 def xpathEvalExpr(self):
6722 """Parse and evaluate an XPath expression in the given
6723 context, then push the result on the context stack """
6724 libxml2mod.xmlXPathEvalExpr(self._o)
6726 def xpathFalseFunction(self, nargs):
6727 """Implement the false() XPath function boolean false() """
6728 libxml2mod.xmlXPathFalseFunction(self._o, nargs)
6730 def xpathFloorFunction(self, nargs):
6731 """Implement the floor() XPath function number floor(number)
6732 The floor function returns the largest (closest to positive
6733 infinity) number that is not greater than the argument and
6734 that is an integer. """
6735 libxml2mod.xmlXPathFloorFunction(self._o, nargs)
6737 def xpathFreeParserContext(self):
6738 """Free up an xmlXPathParserContext """
6739 libxml2mod.xmlXPathFreeParserContext(self._o)
6741 def xpathIdFunction(self, nargs):
6742 """Implement the id() XPath function node-set id(object) The
6743 id function selects elements by their unique ID (see [5.2.1
6744 Unique IDs]). When the argument to id is of type node-set,
6745 then the result is the union of the result of applying id
6746 to the string value of each of the nodes in the argument
6747 node-set. When the argument to id is of any other type, the
6748 argument is converted to a string as if by a call to the
6749 string function; the string is split into a
6750 whitespace-separated list of tokens (whitespace is any
6751 sequence of characters matching the production S); the
6752 result is a node-set containing the elements in the same
6753 document as the context node that have a unique ID equal to
6754 any of the tokens in the list. """
6755 libxml2mod.xmlXPathIdFunction(self._o, nargs)
6757 def xpathLangFunction(self, nargs):
6758 """Implement the lang() XPath function boolean lang(string)
6759 The lang function returns true or false depending on
6760 whether the language of the context node as specified by
6761 xml:lang attributes is the same as or is a sublanguage of
6762 the language specified by the argument string. The language
6763 of the context node is determined by the value of the
6764 xml:lang attribute on the context node, or, if the context
6765 node has no xml:lang attribute, by the value of the
6766 xml:lang attribute on the nearest ancestor of the context
6767 node that has an xml:lang attribute. If there is no such
6768 attribute, then lang """
6769 libxml2mod.xmlXPathLangFunction(self._o, nargs)
6771 def xpathLastFunction(self, nargs):
6772 """Implement the last() XPath function number last() The last
6773 function returns the number of nodes in the context node
6775 libxml2mod.xmlXPathLastFunction(self._o, nargs)
6777 def xpathLocalNameFunction(self, nargs):
6778 """Implement the local-name() XPath function string
6779 local-name(node-set?) The local-name function returns a
6780 string containing the local part of the name of the node in
6781 the argument node-set that is first in document order. If
6782 the node-set is empty or the first node has no name, an
6783 empty string is returned. If the argument is omitted it
6784 defaults to the context node. """
6785 libxml2mod.xmlXPathLocalNameFunction(self._o, nargs)
6787 def xpathModValues(self):
6788 """Implement the mod operation on XPath objects: @arg1 / @arg2
6789 The numeric operators convert their operands to numbers as
6790 if by calling the number function. """
6791 libxml2mod.xmlXPathModValues(self._o)
6793 def xpathMultValues(self):
6794 """Implement the multiply operation on XPath objects: The
6795 numeric operators convert their operands to numbers as if
6796 by calling the number function. """
6797 libxml2mod.xmlXPathMultValues(self._o)
6799 def xpathNamespaceURIFunction(self, nargs):
6800 """Implement the namespace-uri() XPath function string
6801 namespace-uri(node-set?) The namespace-uri function returns
6802 a string containing the namespace URI of the expanded name
6803 of the node in the argument node-set that is first in
6804 document order. If the node-set is empty, the first node
6805 has no name, or the expanded name has no namespace URI, an
6806 empty string is returned. If the argument is omitted it
6807 defaults to the context node. """
6808 libxml2mod.xmlXPathNamespaceURIFunction(self._o, nargs)
6810 def xpathNextAncestor(self, cur):
6811 """Traversal function for the "ancestor" direction the
6812 ancestor axis contains the ancestors of the context node;
6813 the ancestors of the context node consist of the parent of
6814 context node and the parent's parent and so on; the nodes
6815 are ordered in reverse document order; thus the parent is
6816 the first node on the axis, and the parent's parent is the
6817 second node on the axis """
6818 if cur is None: cur__o = None
6819 else: cur__o = cur._o
6820 ret = libxml2mod.xmlXPathNextAncestor(self._o, cur__o)
6821 if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
6822 __tmp = xmlNode(_obj=ret)
6825 def xpathNextAncestorOrSelf(self, cur):
6826 """Traversal function for the "ancestor-or-self" direction he
6827 ancestor-or-self axis contains the context node and
6828 ancestors of the context node in reverse document order;
6829 thus the context node is the first node on the axis, and
6830 the context node's parent the second; parent here is
6831 defined the same as with the parent axis. """
6832 if cur is None: cur__o = None
6833 else: cur__o = cur._o
6834 ret = libxml2mod.xmlXPathNextAncestorOrSelf(self._o, cur__o)
6835 if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
6836 __tmp = xmlNode(_obj=ret)
6839 def xpathNextAttribute(self, cur):
6840 """Traversal function for the "attribute" direction TODO:
6841 support DTD inherited default attributes """
6842 if cur is None: cur__o = None
6843 else: cur__o = cur._o
6844 ret = libxml2mod.xmlXPathNextAttribute(self._o, cur__o)
6845 if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
6846 __tmp = xmlNode(_obj=ret)
6849 def xpathNextChild(self, cur):
6850 """Traversal function for the "child" direction The child axis
6851 contains the children of the context node in document order. """
6852 if cur is None: cur__o = None
6853 else: cur__o = cur._o
6854 ret = libxml2mod.xmlXPathNextChild(self._o, cur__o)
6855 if ret is None:raise xpathError('xmlXPathNextChild() failed')
6856 __tmp = xmlNode(_obj=ret)
6859 def xpathNextDescendant(self, cur):
6860 """Traversal function for the "descendant" direction the
6861 descendant axis contains the descendants of the context
6862 node in document order; a descendant is a child or a child
6863 of a child and so on. """
6864 if cur is None: cur__o = None
6865 else: cur__o = cur._o
6866 ret = libxml2mod.xmlXPathNextDescendant(self._o, cur__o)
6867 if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
6868 __tmp = xmlNode(_obj=ret)
6871 def xpathNextDescendantOrSelf(self, cur):
6872 """Traversal function for the "descendant-or-self" direction
6873 the descendant-or-self axis contains the context node and
6874 the descendants of the context node in document order; thus
6875 the context node is the first node on the axis, and the
6876 first child of the context node is the second node on the
6878 if cur is None: cur__o = None
6879 else: cur__o = cur._o
6880 ret = libxml2mod.xmlXPathNextDescendantOrSelf(self._o, cur__o)
6881 if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
6882 __tmp = xmlNode(_obj=ret)
6885 def xpathNextFollowing(self, cur):
6886 """Traversal function for the "following" direction The
6887 following axis contains all nodes in the same document as
6888 the context node that are after the context node in
6889 document order, excluding any descendants and excluding
6890 attribute nodes and namespace nodes; the nodes are ordered
6891 in document order """
6892 if cur is None: cur__o = None
6893 else: cur__o = cur._o
6894 ret = libxml2mod.xmlXPathNextFollowing(self._o, cur__o)
6895 if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
6896 __tmp = xmlNode(_obj=ret)
6899 def xpathNextFollowingSibling(self, cur):
6900 """Traversal function for the "following-sibling" direction
6901 The following-sibling axis contains the following siblings
6902 of the context node in document order. """
6903 if cur is None: cur__o = None
6904 else: cur__o = cur._o
6905 ret = libxml2mod.xmlXPathNextFollowingSibling(self._o, cur__o)
6906 if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
6907 __tmp = xmlNode(_obj=ret)
6910 def xpathNextNamespace(self, cur):
6911 """Traversal function for the "namespace" direction the
6912 namespace axis contains the namespace nodes of the context
6913 node; the order of nodes on this axis is
6914 implementation-defined; the axis will be empty unless the
6915 context node is an element We keep the XML namespace node
6916 at the end of the list. """
6917 if cur is None: cur__o = None
6918 else: cur__o = cur._o
6919 ret = libxml2mod.xmlXPathNextNamespace(self._o, cur__o)
6920 if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
6921 __tmp = xmlNode(_obj=ret)
6924 def xpathNextParent(self, cur):
6925 """Traversal function for the "parent" direction The parent
6926 axis contains the parent of the context node, if there is
6928 if cur is None: cur__o = None
6929 else: cur__o = cur._o
6930 ret = libxml2mod.xmlXPathNextParent(self._o, cur__o)
6931 if ret is None:raise xpathError('xmlXPathNextParent() failed')
6932 __tmp = xmlNode(_obj=ret)
6935 def xpathNextPreceding(self, cur):
6936 """Traversal function for the "preceding" direction the
6937 preceding axis contains all nodes in the same document as
6938 the context node that are before the context node in
6939 document order, excluding any ancestors and excluding
6940 attribute nodes and namespace nodes; the nodes are ordered
6941 in reverse document order """
6942 if cur is None: cur__o = None
6943 else: cur__o = cur._o
6944 ret = libxml2mod.xmlXPathNextPreceding(self._o, cur__o)
6945 if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
6946 __tmp = xmlNode(_obj=ret)
6949 def xpathNextPrecedingSibling(self, cur):
6950 """Traversal function for the "preceding-sibling" direction
6951 The preceding-sibling axis contains the preceding siblings
6952 of the context node in reverse document order; the first
6953 preceding sibling is first on the axis; the sibling
6954 preceding that node is the second on the axis and so on. """
6955 if cur is None: cur__o = None
6956 else: cur__o = cur._o
6957 ret = libxml2mod.xmlXPathNextPrecedingSibling(self._o, cur__o)
6958 if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
6959 __tmp = xmlNode(_obj=ret)
6962 def xpathNextSelf(self, cur):
6963 """Traversal function for the "self" direction The self axis
6964 contains just the context node itself """
6965 if cur is None: cur__o = None
6966 else: cur__o = cur._o
6967 ret = libxml2mod.xmlXPathNextSelf(self._o, cur__o)
6968 if ret is None:raise xpathError('xmlXPathNextSelf() failed')
6969 __tmp = xmlNode(_obj=ret)
6972 def xpathNormalizeFunction(self, nargs):
6973 """Implement the normalize-space() XPath function string
6974 normalize-space(string?) The normalize-space function
6975 returns the argument string with white space normalized by
6976 stripping leading and trailing whitespace and replacing
6977 sequences of whitespace characters by a single space.
6978 Whitespace characters are the same allowed by the S
6979 production in XML. If the argument is omitted, it defaults
6980 to the context node converted to a string, in other words
6981 the value of the context node. """
6982 libxml2mod.xmlXPathNormalizeFunction(self._o, nargs)
6984 def xpathNotEqualValues(self):
6985 """Implement the equal operation on XPath objects content:
6987 ret = libxml2mod.xmlXPathNotEqualValues(self._o)
6990 def xpathNotFunction(self, nargs):
6991 """Implement the not() XPath function boolean not(boolean) The
6992 not function returns true if its argument is false, and
6993 false otherwise. """
6994 libxml2mod.xmlXPathNotFunction(self._o, nargs)
6996 def xpathNumberFunction(self, nargs):
6997 """Implement the number() XPath function number number(object?) """
6998 libxml2mod.xmlXPathNumberFunction(self._o, nargs)
7000 def xpathParseNCName(self):
7001 """parse an XML namespace non qualified name. [NS 3] NCName
7002 ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::=
7003 Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender """
7004 ret = libxml2mod.xmlXPathParseNCName(self._o)
7007 def xpathParseName(self):
7008 """parse an XML name [4] NameChar ::= Letter | Digit | '.' |
7009 '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
7010 (Letter | '_' | ':') (NameChar)* """
7011 ret = libxml2mod.xmlXPathParseName(self._o)
7014 def xpathPopBoolean(self):
7015 """Pops a boolean from the stack, handling conversion if
7016 needed. Check error with #xmlXPathCheckError. """
7017 ret = libxml2mod.xmlXPathPopBoolean(self._o)
7020 def xpathPopNumber(self):
7021 """Pops a number from the stack, handling conversion if
7022 needed. Check error with #xmlXPathCheckError. """
7023 ret = libxml2mod.xmlXPathPopNumber(self._o)
7026 def xpathPopString(self):
7027 """Pops a string from the stack, handling conversion if
7028 needed. Check error with #xmlXPathCheckError. """
7029 ret = libxml2mod.xmlXPathPopString(self._o)
7032 def xpathPositionFunction(self, nargs):
7033 """Implement the position() XPath function number position()
7034 The position function returns the position of the context
7035 node in the context node list. The first position is 1, and
7036 so the last position will be equal to last(). """
7037 libxml2mod.xmlXPathPositionFunction(self._o, nargs)
7039 def xpathRoot(self):
7040 """Initialize the context to the root of the document """
7041 libxml2mod.xmlXPathRoot(self._o)
7043 def xpathRoundFunction(self, nargs):
7044 """Implement the round() XPath function number round(number)
7045 The round function returns the number that is closest to
7046 the argument and that is an integer. If there are two such
7047 numbers, then the one that is closest to positive infinity
7049 libxml2mod.xmlXPathRoundFunction(self._o, nargs)
7051 def xpathStartsWithFunction(self, nargs):
7052 """Implement the starts-with() XPath function boolean
7053 starts-with(string, string) The starts-with function
7054 returns true if the first argument string starts with the
7055 second argument string, and otherwise returns false. """
7056 libxml2mod.xmlXPathStartsWithFunction(self._o, nargs)
7058 def xpathStringFunction(self, nargs):
7059 """Implement the string() XPath function string
7060 string(object?) The string function converts an object to a
7061 string as follows: - A node-set is converted to a string by
7062 returning the value of the node in the node-set that is
7063 first in document order. If the node-set is empty, an empty
7064 string is returned. - A number is converted to a string as
7065 follows + NaN is converted to the string NaN + positive
7066 zero is converted to the string 0 + negative zero is
7067 converted to the string 0 + positive infinity is converted
7068 to the string Infinity + negative infinity is converted to
7069 the string -Infinity + if the number is an integer, the
7070 number is represented in decimal form as a Number with no
7071 decimal point and no leading zeros, preceded by a minus
7072 sign (-) if the number is negative + otherwise, the number
7073 is represented in decimal form as a Number including a
7074 decimal point with at least one digit before the decimal
7075 point and at least one digit after the decimal point,
7076 preceded by a minus sign (-) if the number is negative;
7077 there must be no leading zeros before the decimal point
7078 apart possibly from the one required digit immediately
7079 before the decimal point; beyond the one required digit
7080 after the decimal point there must be as many, but only as
7081 many, more digits as are needed to uniquely distinguish the
7082 number from all other IEEE 754 numeric values. - The
7083 boolean false value is converted to the string false. The
7084 boolean true value is converted to the string true. If the
7085 argument is omitted, it defaults to a node-set with the
7086 context node as its only member. """
7087 libxml2mod.xmlXPathStringFunction(self._o, nargs)
7089 def xpathStringLengthFunction(self, nargs):
7090 """Implement the string-length() XPath function number
7091 string-length(string?) The string-length returns the number
7092 of characters in the string (see [3.6 Strings]). If the
7093 argument is omitted, it defaults to the context node
7094 converted to a string, in other words the value of the
7096 libxml2mod.xmlXPathStringLengthFunction(self._o, nargs)
7098 def xpathSubValues(self):
7099 """Implement the subtraction operation on XPath objects: The
7100 numeric operators convert their operands to numbers as if
7101 by calling the number function. """
7102 libxml2mod.xmlXPathSubValues(self._o)
7104 def xpathSubstringAfterFunction(self, nargs):
7105 """Implement the substring-after() XPath function string
7106 substring-after(string, string) The substring-after
7107 function returns the substring of the first argument string
7108 that follows the first occurrence of the second argument
7109 string in the first argument string, or the empty stringi
7110 if the first argument string does not contain the second
7111 argument string. For example,
7112 substring-after("1999/04/01","/") returns 04/01, and
7113 substring-after("1999/04/01","19") returns 99/04/01. """
7114 libxml2mod.xmlXPathSubstringAfterFunction(self._o, nargs)
7116 def xpathSubstringBeforeFunction(self, nargs):
7117 """Implement the substring-before() XPath function string
7118 substring-before(string, string) The substring-before
7119 function returns the substring of the first argument string
7120 that precedes the first occurrence of the second argument
7121 string in the first argument string, or the empty string if
7122 the first argument string does not contain the second
7123 argument string. For example,
7124 substring-before("1999/04/01","/") returns 1999. """
7125 libxml2mod.xmlXPathSubstringBeforeFunction(self._o, nargs)
7127 def xpathSubstringFunction(self, nargs):
7128 """Implement the substring() XPath function string
7129 substring(string, number, number?) The substring function
7130 returns the substring of the first argument starting at the
7131 position specified in the second argument with length
7132 specified in the third argument. For example,
7133 substring("12345",2,3) returns "234". If the third argument
7134 is not specified, it returns the substring starting at the
7135 position specified in the second argument and continuing to
7136 the end of the string. For example, substring("12345",2)
7137 returns "2345". More precisely, each character in the
7138 string (see [3.6 Strings]) is considered to have a numeric
7139 position: the position of the first character is 1, the
7140 position of the second character is 2 and so on. The
7141 returned substring contains those characters for which the
7142 position of the character is greater than or equal to the
7143 second argument and, if the third argument is specified,
7144 less than the sum of the second and third arguments; the
7145 comparisons and addition used for the above follow the
7146 standard IEEE 754 rules. Thus: - substring("12345", 1.5,
7147 2.6) returns "234" - substring("12345", 0, 3) returns "12"
7148 - substring("12345", 0 div 0, 3) returns "" -
7149 substring("12345", 1, 0 div 0) returns "" -
7150 substring("12345", -42, 1 div 0) returns "12345" -
7151 substring("12345", -1 div 0, 1 div 0) returns "" """
7152 libxml2mod.xmlXPathSubstringFunction(self._o, nargs)
7154 def xpathSumFunction(self, nargs):
7155 """Implement the sum() XPath function number sum(node-set) The
7156 sum function returns the sum of the values of the nodes in
7157 the argument node-set. """
7158 libxml2mod.xmlXPathSumFunction(self._o, nargs)
7160 def xpathTranslateFunction(self, nargs):
7161 """Implement the translate() XPath function string
7162 translate(string, string, string) The translate function
7163 returns the first argument string with occurrences of
7164 characters in the second argument string replaced by the
7165 character at the corresponding position in the third
7166 argument string. For example, translate("bar","abc","ABC")
7167 returns the string BAr. If there is a character in the
7168 second argument string with no character at a corresponding
7169 position in the third argument string (because the second
7170 argument string is longer than the third argument string),
7171 then occurrences of that character in the first argument
7172 string are removed. For example,
7173 translate("--aaa--","abc-","ABC") """
7174 libxml2mod.xmlXPathTranslateFunction(self._o, nargs)
7176 def xpathTrueFunction(self, nargs):
7177 """Implement the true() XPath function boolean true() """
7178 libxml2mod.xmlXPathTrueFunction(self._o, nargs)
7180 def xpathValueFlipSign(self):
7181 """Implement the unary - operation on an XPath object The
7182 numeric operators convert their operands to numbers as if
7183 by calling the number function. """
7184 libxml2mod.xmlXPathValueFlipSign(self._o)
7186 def xpatherror(self, file, line, no):
7187 """Formats an error message. """
7188 libxml2mod.xmlXPatherror(self._o, file, line, no)
7191 # xpathParserContext functions from module xpointer
7194 def xpointerEvalRangePredicate(self):
7195 """[8] Predicate ::= '[' PredicateExpr ']' [9]
7196 PredicateExpr ::= Expr Evaluate a predicate as in
7197 xmlXPathEvalPredicate() but for a Location Set instead of a
7199 libxml2mod.xmlXPtrEvalRangePredicate(self._o)
7201 def xpointerRangeToFunction(self, nargs):
7202 """Implement the range-to() XPointer function Obsolete.
7203 range-to is not a real function but a special type of
7204 location step which is handled in xpath.c. """
7205 libxml2mod.xmlXPtrRangeToFunction(self._o, nargs)
7210 XLINK_SHOW_EMBED = 2
7211 XLINK_SHOW_REPLACE = 3
7213 # xmlRelaxNGParserFlag
7214 XML_RELAXNGP_NONE = 0
7215 XML_RELAXNGP_FREE_DOC = 1
7216 XML_RELAXNGP_CRNG = 2
7218 # xmlBufferAllocationScheme
7219 XML_BUFFER_ALLOC_DOUBLEIT = 1
7220 XML_BUFFER_ALLOC_EXACT = 2
7221 XML_BUFFER_ALLOC_IMMUTABLE = 3
7222 XML_BUFFER_ALLOC_IO = 4
7223 XML_BUFFER_ALLOC_HYBRID = 5
7224 XML_BUFFER_ALLOC_BOUNDED = 6
7226 # xmlParserSeverities
7227 XML_PARSER_SEVERITY_VALIDITY_WARNING = 1
7228 XML_PARSER_SEVERITY_VALIDITY_ERROR = 2
7229 XML_PARSER_SEVERITY_WARNING = 3
7230 XML_PARSER_SEVERITY_ERROR = 4
7232 # xmlAttributeDefault
7233 XML_ATTRIBUTE_NONE = 1
7234 XML_ATTRIBUTE_REQUIRED = 2
7235 XML_ATTRIBUTE_IMPLIED = 3
7236 XML_ATTRIBUTE_FIXED = 4
7239 XML_SCHEMAS_UNKNOWN = 0
7240 XML_SCHEMAS_STRING = 1
7241 XML_SCHEMAS_NORMSTRING = 2
7242 XML_SCHEMAS_DECIMAL = 3
7243 XML_SCHEMAS_TIME = 4
7244 XML_SCHEMAS_GDAY = 5
7245 XML_SCHEMAS_GMONTH = 6
7246 XML_SCHEMAS_GMONTHDAY = 7
7247 XML_SCHEMAS_GYEAR = 8
7248 XML_SCHEMAS_GYEARMONTH = 9
7249 XML_SCHEMAS_DATE = 10
7250 XML_SCHEMAS_DATETIME = 11
7251 XML_SCHEMAS_DURATION = 12
7252 XML_SCHEMAS_FLOAT = 13
7253 XML_SCHEMAS_DOUBLE = 14
7254 XML_SCHEMAS_BOOLEAN = 15
7255 XML_SCHEMAS_TOKEN = 16
7256 XML_SCHEMAS_LANGUAGE = 17
7257 XML_SCHEMAS_NMTOKEN = 18
7258 XML_SCHEMAS_NMTOKENS = 19
7259 XML_SCHEMAS_NAME = 20
7260 XML_SCHEMAS_QNAME = 21
7261 XML_SCHEMAS_NCNAME = 22
7263 XML_SCHEMAS_IDREF = 24
7264 XML_SCHEMAS_IDREFS = 25
7265 XML_SCHEMAS_ENTITY = 26
7266 XML_SCHEMAS_ENTITIES = 27
7267 XML_SCHEMAS_NOTATION = 28
7268 XML_SCHEMAS_ANYURI = 29
7269 XML_SCHEMAS_INTEGER = 30
7270 XML_SCHEMAS_NPINTEGER = 31
7271 XML_SCHEMAS_NINTEGER = 32
7272 XML_SCHEMAS_NNINTEGER = 33
7273 XML_SCHEMAS_PINTEGER = 34
7274 XML_SCHEMAS_INT = 35
7275 XML_SCHEMAS_UINT = 36
7276 XML_SCHEMAS_LONG = 37
7277 XML_SCHEMAS_ULONG = 38
7278 XML_SCHEMAS_SHORT = 39
7279 XML_SCHEMAS_USHORT = 40
7280 XML_SCHEMAS_BYTE = 41
7281 XML_SCHEMAS_UBYTE = 42
7282 XML_SCHEMAS_HEXBINARY = 43
7283 XML_SCHEMAS_BASE64BINARY = 44
7284 XML_SCHEMAS_ANYTYPE = 45
7285 XML_SCHEMAS_ANYSIMPLETYPE = 46
7287 # xmlParserInputState
7289 XML_PARSER_START = 0
7293 XML_PARSER_PROLOG = 4
7294 XML_PARSER_COMMENT = 5
7295 XML_PARSER_START_TAG = 6
7296 XML_PARSER_CONTENT = 7
7297 XML_PARSER_CDATA_SECTION = 8
7298 XML_PARSER_END_TAG = 9
7299 XML_PARSER_ENTITY_DECL = 10
7300 XML_PARSER_ENTITY_VALUE = 11
7301 XML_PARSER_ATTRIBUTE_VALUE = 12
7302 XML_PARSER_SYSTEM_LITERAL = 13
7303 XML_PARSER_EPILOG = 14
7304 XML_PARSER_IGNORE = 15
7305 XML_PARSER_PUBLIC_LITERAL = 16
7308 XML_INTERNAL_GENERAL_ENTITY = 1
7309 XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2
7310 XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3
7311 XML_INTERNAL_PARAMETER_ENTITY = 4
7312 XML_EXTERNAL_PARAMETER_ENTITY = 5
7313 XML_INTERNAL_PREDEFINED_ENTITY = 6
7317 XML_SAVE_NO_DECL = 2
7318 XML_SAVE_NO_EMPTY = 4
7319 XML_SAVE_NO_XHTML = 8
7321 XML_SAVE_AS_XML = 32
7322 XML_SAVE_AS_HTML = 64
7323 XML_SAVE_WSNONSIG = 128
7326 XML_PATTERN_DEFAULT = 0
7327 XML_PATTERN_XPATH = 1
7328 XML_PATTERN_XSSEL = 2
7329 XML_PATTERN_XSFIELD = 4
7333 XML_ERR_INTERNAL_ERROR = 1
7334 XML_ERR_NO_MEMORY = 2
7335 XML_ERR_DOCUMENT_START = 3
7336 XML_ERR_DOCUMENT_EMPTY = 4
7337 XML_ERR_DOCUMENT_END = 5
7338 XML_ERR_INVALID_HEX_CHARREF = 6
7339 XML_ERR_INVALID_DEC_CHARREF = 7
7340 XML_ERR_INVALID_CHARREF = 8
7341 XML_ERR_INVALID_CHAR = 9
7342 XML_ERR_CHARREF_AT_EOF = 10
7343 XML_ERR_CHARREF_IN_PROLOG = 11
7344 XML_ERR_CHARREF_IN_EPILOG = 12
7345 XML_ERR_CHARREF_IN_DTD = 13
7346 XML_ERR_ENTITYREF_AT_EOF = 14
7347 XML_ERR_ENTITYREF_IN_PROLOG = 15
7348 XML_ERR_ENTITYREF_IN_EPILOG = 16
7349 XML_ERR_ENTITYREF_IN_DTD = 17
7350 XML_ERR_PEREF_AT_EOF = 18
7351 XML_ERR_PEREF_IN_PROLOG = 19
7352 XML_ERR_PEREF_IN_EPILOG = 20
7353 XML_ERR_PEREF_IN_INT_SUBSET = 21
7354 XML_ERR_ENTITYREF_NO_NAME = 22
7355 XML_ERR_ENTITYREF_SEMICOL_MISSING = 23
7356 XML_ERR_PEREF_NO_NAME = 24
7357 XML_ERR_PEREF_SEMICOL_MISSING = 25
7358 XML_ERR_UNDECLARED_ENTITY = 26
7359 XML_WAR_UNDECLARED_ENTITY = 27
7360 XML_ERR_UNPARSED_ENTITY = 28
7361 XML_ERR_ENTITY_IS_EXTERNAL = 29
7362 XML_ERR_ENTITY_IS_PARAMETER = 30
7363 XML_ERR_UNKNOWN_ENCODING = 31
7364 XML_ERR_UNSUPPORTED_ENCODING = 32
7365 XML_ERR_STRING_NOT_STARTED = 33
7366 XML_ERR_STRING_NOT_CLOSED = 34
7367 XML_ERR_NS_DECL_ERROR = 35
7368 XML_ERR_ENTITY_NOT_STARTED = 36
7369 XML_ERR_ENTITY_NOT_FINISHED = 37
7370 XML_ERR_LT_IN_ATTRIBUTE = 38
7371 XML_ERR_ATTRIBUTE_NOT_STARTED = 39
7372 XML_ERR_ATTRIBUTE_NOT_FINISHED = 40
7373 XML_ERR_ATTRIBUTE_WITHOUT_VALUE = 41
7374 XML_ERR_ATTRIBUTE_REDEFINED = 42
7375 XML_ERR_LITERAL_NOT_STARTED = 43
7376 XML_ERR_LITERAL_NOT_FINISHED = 44
7377 XML_ERR_COMMENT_NOT_FINISHED = 45
7378 XML_ERR_PI_NOT_STARTED = 46
7379 XML_ERR_PI_NOT_FINISHED = 47
7380 XML_ERR_NOTATION_NOT_STARTED = 48
7381 XML_ERR_NOTATION_NOT_FINISHED = 49
7382 XML_ERR_ATTLIST_NOT_STARTED = 50
7383 XML_ERR_ATTLIST_NOT_FINISHED = 51
7384 XML_ERR_MIXED_NOT_STARTED = 52
7385 XML_ERR_MIXED_NOT_FINISHED = 53
7386 XML_ERR_ELEMCONTENT_NOT_STARTED = 54
7387 XML_ERR_ELEMCONTENT_NOT_FINISHED = 55
7388 XML_ERR_XMLDECL_NOT_STARTED = 56
7389 XML_ERR_XMLDECL_NOT_FINISHED = 57
7390 XML_ERR_CONDSEC_NOT_STARTED = 58
7391 XML_ERR_CONDSEC_NOT_FINISHED = 59
7392 XML_ERR_EXT_SUBSET_NOT_FINISHED = 60
7393 XML_ERR_DOCTYPE_NOT_FINISHED = 61
7394 XML_ERR_MISPLACED_CDATA_END = 62
7395 XML_ERR_CDATA_NOT_FINISHED = 63
7396 XML_ERR_RESERVED_XML_NAME = 64
7397 XML_ERR_SPACE_REQUIRED = 65
7398 XML_ERR_SEPARATOR_REQUIRED = 66
7399 XML_ERR_NMTOKEN_REQUIRED = 67
7400 XML_ERR_NAME_REQUIRED = 68
7401 XML_ERR_PCDATA_REQUIRED = 69
7402 XML_ERR_URI_REQUIRED = 70
7403 XML_ERR_PUBID_REQUIRED = 71
7404 XML_ERR_LT_REQUIRED = 72
7405 XML_ERR_GT_REQUIRED = 73
7406 XML_ERR_LTSLASH_REQUIRED = 74
7407 XML_ERR_EQUAL_REQUIRED = 75
7408 XML_ERR_TAG_NAME_MISMATCH = 76
7409 XML_ERR_TAG_NOT_FINISHED = 77
7410 XML_ERR_STANDALONE_VALUE = 78
7411 XML_ERR_ENCODING_NAME = 79
7412 XML_ERR_HYPHEN_IN_COMMENT = 80
7413 XML_ERR_INVALID_ENCODING = 81
7414 XML_ERR_EXT_ENTITY_STANDALONE = 82
7415 XML_ERR_CONDSEC_INVALID = 83
7416 XML_ERR_VALUE_REQUIRED = 84
7417 XML_ERR_NOT_WELL_BALANCED = 85
7418 XML_ERR_EXTRA_CONTENT = 86
7419 XML_ERR_ENTITY_CHAR_ERROR = 87
7420 XML_ERR_ENTITY_PE_INTERNAL = 88
7421 XML_ERR_ENTITY_LOOP = 89
7422 XML_ERR_ENTITY_BOUNDARY = 90
7423 XML_ERR_INVALID_URI = 91
7424 XML_ERR_URI_FRAGMENT = 92
7425 XML_WAR_CATALOG_PI = 93
7427 XML_ERR_CONDSEC_INVALID_KEYWORD = 95
7428 XML_ERR_VERSION_MISSING = 96
7429 XML_WAR_UNKNOWN_VERSION = 97
7430 XML_WAR_LANG_VALUE = 98
7432 XML_WAR_NS_URI_RELATIVE = 100
7433 XML_ERR_MISSING_ENCODING = 101
7434 XML_WAR_SPACE_VALUE = 102
7435 XML_ERR_NOT_STANDALONE = 103
7436 XML_ERR_ENTITY_PROCESSING = 104
7437 XML_ERR_NOTATION_PROCESSING = 105
7438 XML_WAR_NS_COLUMN = 106
7439 XML_WAR_ENTITY_REDEFINED = 107
7440 XML_ERR_UNKNOWN_VERSION = 108
7441 XML_ERR_VERSION_MISMATCH = 109
7442 XML_ERR_NAME_TOO_LONG = 110
7443 XML_ERR_USER_STOP = 111
7444 XML_NS_ERR_XML_NAMESPACE = 200
7445 XML_NS_ERR_UNDEFINED_NAMESPACE = 201
7446 XML_NS_ERR_QNAME = 202
7447 XML_NS_ERR_ATTRIBUTE_REDEFINED = 203
7448 XML_NS_ERR_EMPTY = 204
7449 XML_NS_ERR_COLON = 205
7450 XML_DTD_ATTRIBUTE_DEFAULT = 500
7451 XML_DTD_ATTRIBUTE_REDEFINED = 501
7452 XML_DTD_ATTRIBUTE_VALUE = 502
7453 XML_DTD_CONTENT_ERROR = 503
7454 XML_DTD_CONTENT_MODEL = 504
7455 XML_DTD_CONTENT_NOT_DETERMINIST = 505
7456 XML_DTD_DIFFERENT_PREFIX = 506
7457 XML_DTD_ELEM_DEFAULT_NAMESPACE = 507
7458 XML_DTD_ELEM_NAMESPACE = 508
7459 XML_DTD_ELEM_REDEFINED = 509
7460 XML_DTD_EMPTY_NOTATION = 510
7461 XML_DTD_ENTITY_TYPE = 511
7462 XML_DTD_ID_FIXED = 512
7463 XML_DTD_ID_REDEFINED = 513
7464 XML_DTD_ID_SUBSET = 514
7465 XML_DTD_INVALID_CHILD = 515
7466 XML_DTD_INVALID_DEFAULT = 516
7467 XML_DTD_LOAD_ERROR = 517
7468 XML_DTD_MISSING_ATTRIBUTE = 518
7469 XML_DTD_MIXED_CORRUPT = 519
7470 XML_DTD_MULTIPLE_ID = 520
7471 XML_DTD_NO_DOC = 521
7472 XML_DTD_NO_DTD = 522
7473 XML_DTD_NO_ELEM_NAME = 523
7474 XML_DTD_NO_PREFIX = 524
7475 XML_DTD_NO_ROOT = 525
7476 XML_DTD_NOTATION_REDEFINED = 526
7477 XML_DTD_NOTATION_VALUE = 527
7478 XML_DTD_NOT_EMPTY = 528
7479 XML_DTD_NOT_PCDATA = 529
7480 XML_DTD_NOT_STANDALONE = 530
7481 XML_DTD_ROOT_NAME = 531
7482 XML_DTD_STANDALONE_WHITE_SPACE = 532
7483 XML_DTD_UNKNOWN_ATTRIBUTE = 533
7484 XML_DTD_UNKNOWN_ELEM = 534
7485 XML_DTD_UNKNOWN_ENTITY = 535
7486 XML_DTD_UNKNOWN_ID = 536
7487 XML_DTD_UNKNOWN_NOTATION = 537
7488 XML_DTD_STANDALONE_DEFAULTED = 538
7489 XML_DTD_XMLID_VALUE = 539
7490 XML_DTD_XMLID_TYPE = 540
7491 XML_DTD_DUP_TOKEN = 541
7492 XML_HTML_STRUCURE_ERROR = 800
7493 XML_HTML_UNKNOWN_TAG = 801
7494 XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000
7495 XML_RNGP_ATTR_CONFLICT = 1001
7496 XML_RNGP_ATTRIBUTE_CHILDREN = 1002
7497 XML_RNGP_ATTRIBUTE_CONTENT = 1003
7498 XML_RNGP_ATTRIBUTE_EMPTY = 1004
7499 XML_RNGP_ATTRIBUTE_NOOP = 1005
7500 XML_RNGP_CHOICE_CONTENT = 1006
7501 XML_RNGP_CHOICE_EMPTY = 1007
7502 XML_RNGP_CREATE_FAILURE = 1008
7503 XML_RNGP_DATA_CONTENT = 1009
7504 XML_RNGP_DEF_CHOICE_AND_INTERLEAVE = 1010
7505 XML_RNGP_DEFINE_CREATE_FAILED = 1011
7506 XML_RNGP_DEFINE_EMPTY = 1012
7507 XML_RNGP_DEFINE_MISSING = 1013
7508 XML_RNGP_DEFINE_NAME_MISSING = 1014
7509 XML_RNGP_ELEM_CONTENT_EMPTY = 1015
7510 XML_RNGP_ELEM_CONTENT_ERROR = 1016
7511 XML_RNGP_ELEMENT_EMPTY = 1017
7512 XML_RNGP_ELEMENT_CONTENT = 1018
7513 XML_RNGP_ELEMENT_NAME = 1019
7514 XML_RNGP_ELEMENT_NO_CONTENT = 1020
7515 XML_RNGP_ELEM_TEXT_CONFLICT = 1021
7516 XML_RNGP_EMPTY = 1022
7517 XML_RNGP_EMPTY_CONSTRUCT = 1023
7518 XML_RNGP_EMPTY_CONTENT = 1024
7519 XML_RNGP_EMPTY_NOT_EMPTY = 1025
7520 XML_RNGP_ERROR_TYPE_LIB = 1026
7521 XML_RNGP_EXCEPT_EMPTY = 1027
7522 XML_RNGP_EXCEPT_MISSING = 1028
7523 XML_RNGP_EXCEPT_MULTIPLE = 1029
7524 XML_RNGP_EXCEPT_NO_CONTENT = 1030
7525 XML_RNGP_EXTERNALREF_EMTPY = 1031
7526 XML_RNGP_EXTERNAL_REF_FAILURE = 1032
7527 XML_RNGP_EXTERNALREF_RECURSE = 1033
7528 XML_RNGP_FORBIDDEN_ATTRIBUTE = 1034
7529 XML_RNGP_FOREIGN_ELEMENT = 1035
7530 XML_RNGP_GRAMMAR_CONTENT = 1036
7531 XML_RNGP_GRAMMAR_EMPTY = 1037
7532 XML_RNGP_GRAMMAR_MISSING = 1038
7533 XML_RNGP_GRAMMAR_NO_START = 1039
7534 XML_RNGP_GROUP_ATTR_CONFLICT = 1040
7535 XML_RNGP_HREF_ERROR = 1041
7536 XML_RNGP_INCLUDE_EMPTY = 1042
7537 XML_RNGP_INCLUDE_FAILURE = 1043
7538 XML_RNGP_INCLUDE_RECURSE = 1044
7539 XML_RNGP_INTERLEAVE_ADD = 1045
7540 XML_RNGP_INTERLEAVE_CREATE_FAILED = 1046
7541 XML_RNGP_INTERLEAVE_EMPTY = 1047
7542 XML_RNGP_INTERLEAVE_NO_CONTENT = 1048
7543 XML_RNGP_INVALID_DEFINE_NAME = 1049
7544 XML_RNGP_INVALID_URI = 1050
7545 XML_RNGP_INVALID_VALUE = 1051
7546 XML_RNGP_MISSING_HREF = 1052
7547 XML_RNGP_NAME_MISSING = 1053
7548 XML_RNGP_NEED_COMBINE = 1054
7549 XML_RNGP_NOTALLOWED_NOT_EMPTY = 1055
7550 XML_RNGP_NSNAME_ATTR_ANCESTOR = 1056
7551 XML_RNGP_NSNAME_NO_NS = 1057
7552 XML_RNGP_PARAM_FORBIDDEN = 1058
7553 XML_RNGP_PARAM_NAME_MISSING = 1059
7554 XML_RNGP_PARENTREF_CREATE_FAILED = 1060
7555 XML_RNGP_PARENTREF_NAME_INVALID = 1061
7556 XML_RNGP_PARENTREF_NO_NAME = 1062
7557 XML_RNGP_PARENTREF_NO_PARENT = 1063
7558 XML_RNGP_PARENTREF_NOT_EMPTY = 1064
7559 XML_RNGP_PARSE_ERROR = 1065
7560 XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME = 1066
7561 XML_RNGP_PAT_ATTR_ATTR = 1067
7562 XML_RNGP_PAT_ATTR_ELEM = 1068
7563 XML_RNGP_PAT_DATA_EXCEPT_ATTR = 1069
7564 XML_RNGP_PAT_DATA_EXCEPT_ELEM = 1070
7565 XML_RNGP_PAT_DATA_EXCEPT_EMPTY = 1071
7566 XML_RNGP_PAT_DATA_EXCEPT_GROUP = 1072
7567 XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE = 1073
7568 XML_RNGP_PAT_DATA_EXCEPT_LIST = 1074
7569 XML_RNGP_PAT_DATA_EXCEPT_ONEMORE = 1075
7570 XML_RNGP_PAT_DATA_EXCEPT_REF = 1076
7571 XML_RNGP_PAT_DATA_EXCEPT_TEXT = 1077
7572 XML_RNGP_PAT_LIST_ATTR = 1078
7573 XML_RNGP_PAT_LIST_ELEM = 1079
7574 XML_RNGP_PAT_LIST_INTERLEAVE = 1080
7575 XML_RNGP_PAT_LIST_LIST = 1081
7576 XML_RNGP_PAT_LIST_REF = 1082
7577 XML_RNGP_PAT_LIST_TEXT = 1083
7578 XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME = 1084
7579 XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME = 1085
7580 XML_RNGP_PAT_ONEMORE_GROUP_ATTR = 1086
7581 XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR = 1087
7582 XML_RNGP_PAT_START_ATTR = 1088
7583 XML_RNGP_PAT_START_DATA = 1089
7584 XML_RNGP_PAT_START_EMPTY = 1090
7585 XML_RNGP_PAT_START_GROUP = 1091
7586 XML_RNGP_PAT_START_INTERLEAVE = 1092
7587 XML_RNGP_PAT_START_LIST = 1093
7588 XML_RNGP_PAT_START_ONEMORE = 1094
7589 XML_RNGP_PAT_START_TEXT = 1095
7590 XML_RNGP_PAT_START_VALUE = 1096
7591 XML_RNGP_PREFIX_UNDEFINED = 1097
7592 XML_RNGP_REF_CREATE_FAILED = 1098
7593 XML_RNGP_REF_CYCLE = 1099
7594 XML_RNGP_REF_NAME_INVALID = 1100
7595 XML_RNGP_REF_NO_DEF = 1101
7596 XML_RNGP_REF_NO_NAME = 1102
7597 XML_RNGP_REF_NOT_EMPTY = 1103
7598 XML_RNGP_START_CHOICE_AND_INTERLEAVE = 1104
7599 XML_RNGP_START_CONTENT = 1105
7600 XML_RNGP_START_EMPTY = 1106
7601 XML_RNGP_START_MISSING = 1107
7602 XML_RNGP_TEXT_EXPECTED = 1108
7603 XML_RNGP_TEXT_HAS_CHILD = 1109
7604 XML_RNGP_TYPE_MISSING = 1110
7605 XML_RNGP_TYPE_NOT_FOUND = 1111
7606 XML_RNGP_TYPE_VALUE = 1112
7607 XML_RNGP_UNKNOWN_ATTRIBUTE = 1113
7608 XML_RNGP_UNKNOWN_COMBINE = 1114
7609 XML_RNGP_UNKNOWN_CONSTRUCT = 1115
7610 XML_RNGP_UNKNOWN_TYPE_LIB = 1116
7611 XML_RNGP_URI_FRAGMENT = 1117
7612 XML_RNGP_URI_NOT_ABSOLUTE = 1118
7613 XML_RNGP_VALUE_EMPTY = 1119
7614 XML_RNGP_VALUE_NO_CONTENT = 1120
7615 XML_RNGP_XMLNS_NAME = 1121
7616 XML_RNGP_XML_NS = 1122
7617 XML_XPATH_EXPRESSION_OK = 1200
7618 XML_XPATH_NUMBER_ERROR = 1201
7619 XML_XPATH_UNFINISHED_LITERAL_ERROR = 1202
7620 XML_XPATH_START_LITERAL_ERROR = 1203
7621 XML_XPATH_VARIABLE_REF_ERROR = 1204
7622 XML_XPATH_UNDEF_VARIABLE_ERROR = 1205
7623 XML_XPATH_INVALID_PREDICATE_ERROR = 1206
7624 XML_XPATH_EXPR_ERROR = 1207
7625 XML_XPATH_UNCLOSED_ERROR = 1208
7626 XML_XPATH_UNKNOWN_FUNC_ERROR = 1209
7627 XML_XPATH_INVALID_OPERAND = 1210
7628 XML_XPATH_INVALID_TYPE = 1211
7629 XML_XPATH_INVALID_ARITY = 1212
7630 XML_XPATH_INVALID_CTXT_SIZE = 1213
7631 XML_XPATH_INVALID_CTXT_POSITION = 1214
7632 XML_XPATH_MEMORY_ERROR = 1215
7633 XML_XPTR_SYNTAX_ERROR = 1216
7634 XML_XPTR_RESOURCE_ERROR = 1217
7635 XML_XPTR_SUB_RESOURCE_ERROR = 1218
7636 XML_XPATH_UNDEF_PREFIX_ERROR = 1219
7637 XML_XPATH_ENCODING_ERROR = 1220
7638 XML_XPATH_INVALID_CHAR_ERROR = 1221
7639 XML_TREE_INVALID_HEX = 1300
7640 XML_TREE_INVALID_DEC = 1301
7641 XML_TREE_UNTERMINATED_ENTITY = 1302
7642 XML_TREE_NOT_UTF8 = 1303
7643 XML_SAVE_NOT_UTF8 = 1400
7644 XML_SAVE_CHAR_INVALID = 1401
7645 XML_SAVE_NO_DOCTYPE = 1402
7646 XML_SAVE_UNKNOWN_ENCODING = 1403
7647 XML_REGEXP_COMPILE_ERROR = 1450
7648 XML_IO_UNKNOWN = 1500
7649 XML_IO_EACCES = 1501
7650 XML_IO_EAGAIN = 1502
7652 XML_IO_EBADMSG = 1504
7654 XML_IO_ECANCELED = 1506
7655 XML_IO_ECHILD = 1507
7656 XML_IO_EDEADLK = 1508
7658 XML_IO_EEXIST = 1510
7659 XML_IO_EFAULT = 1511
7661 XML_IO_EINPROGRESS = 1513
7663 XML_IO_EINVAL = 1515
7665 XML_IO_EISDIR = 1517
7666 XML_IO_EMFILE = 1518
7667 XML_IO_EMLINK = 1519
7668 XML_IO_EMSGSIZE = 1520
7669 XML_IO_ENAMETOOLONG = 1521
7670 XML_IO_ENFILE = 1522
7671 XML_IO_ENODEV = 1523
7672 XML_IO_ENOENT = 1524
7673 XML_IO_ENOEXEC = 1525
7674 XML_IO_ENOLCK = 1526
7675 XML_IO_ENOMEM = 1527
7676 XML_IO_ENOSPC = 1528
7677 XML_IO_ENOSYS = 1529
7678 XML_IO_ENOTDIR = 1530
7679 XML_IO_ENOTEMPTY = 1531
7680 XML_IO_ENOTSUP = 1532
7681 XML_IO_ENOTTY = 1533
7685 XML_IO_ERANGE = 1537
7687 XML_IO_ESPIPE = 1539
7689 XML_IO_ETIMEDOUT = 1541
7691 XML_IO_NETWORK_ATTEMPT = 1543
7692 XML_IO_ENCODER = 1544
7695 XML_IO_NO_INPUT = 1547
7696 XML_IO_BUFFER_FULL = 1548
7697 XML_IO_LOAD_ERROR = 1549
7698 XML_IO_ENOTSOCK = 1550
7699 XML_IO_EISCONN = 1551
7700 XML_IO_ECONNREFUSED = 1552
7701 XML_IO_ENETUNREACH = 1553
7702 XML_IO_EADDRINUSE = 1554
7703 XML_IO_EALREADY = 1555
7704 XML_IO_EAFNOSUPPORT = 1556
7705 XML_XINCLUDE_RECURSION = 1600
7706 XML_XINCLUDE_PARSE_VALUE = 1601
7707 XML_XINCLUDE_ENTITY_DEF_MISMATCH = 1602
7708 XML_XINCLUDE_NO_HREF = 1603
7709 XML_XINCLUDE_NO_FALLBACK = 1604
7710 XML_XINCLUDE_HREF_URI = 1605
7711 XML_XINCLUDE_TEXT_FRAGMENT = 1606
7712 XML_XINCLUDE_TEXT_DOCUMENT = 1607
7713 XML_XINCLUDE_INVALID_CHAR = 1608
7714 XML_XINCLUDE_BUILD_FAILED = 1609
7715 XML_XINCLUDE_UNKNOWN_ENCODING = 1610
7716 XML_XINCLUDE_MULTIPLE_ROOT = 1611
7717 XML_XINCLUDE_XPTR_FAILED = 1612
7718 XML_XINCLUDE_XPTR_RESULT = 1613
7719 XML_XINCLUDE_INCLUDE_IN_INCLUDE = 1614
7720 XML_XINCLUDE_FALLBACKS_IN_INCLUDE = 1615
7721 XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE = 1616
7722 XML_XINCLUDE_DEPRECATED_NS = 1617
7723 XML_XINCLUDE_FRAGMENT_ID = 1618
7724 XML_CATALOG_MISSING_ATTR = 1650
7725 XML_CATALOG_ENTRY_BROKEN = 1651
7726 XML_CATALOG_PREFER_VALUE = 1652
7727 XML_CATALOG_NOT_CATALOG = 1653
7728 XML_CATALOG_RECURSION = 1654
7729 XML_SCHEMAP_PREFIX_UNDEFINED = 1700
7730 XML_SCHEMAP_ATTRFORMDEFAULT_VALUE = 1701
7731 XML_SCHEMAP_ATTRGRP_NONAME_NOREF = 1702
7732 XML_SCHEMAP_ATTR_NONAME_NOREF = 1703
7733 XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF = 1704
7734 XML_SCHEMAP_ELEMFORMDEFAULT_VALUE = 1705
7735 XML_SCHEMAP_ELEM_NONAME_NOREF = 1706
7736 XML_SCHEMAP_EXTENSION_NO_BASE = 1707
7737 XML_SCHEMAP_FACET_NO_VALUE = 1708
7738 XML_SCHEMAP_FAILED_BUILD_IMPORT = 1709
7739 XML_SCHEMAP_GROUP_NONAME_NOREF = 1710
7740 XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI = 1711
7741 XML_SCHEMAP_IMPORT_REDEFINE_NSNAME = 1712
7742 XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI = 1713
7743 XML_SCHEMAP_INVALID_BOOLEAN = 1714
7744 XML_SCHEMAP_INVALID_ENUM = 1715
7745 XML_SCHEMAP_INVALID_FACET = 1716
7746 XML_SCHEMAP_INVALID_FACET_VALUE = 1717
7747 XML_SCHEMAP_INVALID_MAXOCCURS = 1718
7748 XML_SCHEMAP_INVALID_MINOCCURS = 1719
7749 XML_SCHEMAP_INVALID_REF_AND_SUBTYPE = 1720
7750 XML_SCHEMAP_INVALID_WHITE_SPACE = 1721
7751 XML_SCHEMAP_NOATTR_NOREF = 1722
7752 XML_SCHEMAP_NOTATION_NO_NAME = 1723
7753 XML_SCHEMAP_NOTYPE_NOREF = 1724
7754 XML_SCHEMAP_REF_AND_SUBTYPE = 1725
7755 XML_SCHEMAP_RESTRICTION_NONAME_NOREF = 1726
7756 XML_SCHEMAP_SIMPLETYPE_NONAME = 1727
7757 XML_SCHEMAP_TYPE_AND_SUBTYPE = 1728
7758 XML_SCHEMAP_UNKNOWN_ALL_CHILD = 1729
7759 XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD = 1730
7760 XML_SCHEMAP_UNKNOWN_ATTR_CHILD = 1731
7761 XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD = 1732
7762 XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP = 1733
7763 XML_SCHEMAP_UNKNOWN_BASE_TYPE = 1734
7764 XML_SCHEMAP_UNKNOWN_CHOICE_CHILD = 1735
7765 XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD = 1736
7766 XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD = 1737
7767 XML_SCHEMAP_UNKNOWN_ELEM_CHILD = 1738
7768 XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD = 1739
7769 XML_SCHEMAP_UNKNOWN_FACET_CHILD = 1740
7770 XML_SCHEMAP_UNKNOWN_FACET_TYPE = 1741
7771 XML_SCHEMAP_UNKNOWN_GROUP_CHILD = 1742
7772 XML_SCHEMAP_UNKNOWN_IMPORT_CHILD = 1743
7773 XML_SCHEMAP_UNKNOWN_LIST_CHILD = 1744
7774 XML_SCHEMAP_UNKNOWN_NOTATION_CHILD = 1745
7775 XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD = 1746
7776 XML_SCHEMAP_UNKNOWN_REF = 1747
7777 XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD = 1748
7778 XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD = 1749
7779 XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD = 1750
7780 XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD = 1751
7781 XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD = 1752
7782 XML_SCHEMAP_UNKNOWN_TYPE = 1753
7783 XML_SCHEMAP_UNKNOWN_UNION_CHILD = 1754
7784 XML_SCHEMAP_ELEM_DEFAULT_FIXED = 1755
7785 XML_SCHEMAP_REGEXP_INVALID = 1756
7786 XML_SCHEMAP_FAILED_LOAD = 1757
7787 XML_SCHEMAP_NOTHING_TO_PARSE = 1758
7788 XML_SCHEMAP_NOROOT = 1759
7789 XML_SCHEMAP_REDEFINED_GROUP = 1760
7790 XML_SCHEMAP_REDEFINED_TYPE = 1761
7791 XML_SCHEMAP_REDEFINED_ELEMENT = 1762
7792 XML_SCHEMAP_REDEFINED_ATTRGROUP = 1763
7793 XML_SCHEMAP_REDEFINED_ATTR = 1764
7794 XML_SCHEMAP_REDEFINED_NOTATION = 1765
7795 XML_SCHEMAP_FAILED_PARSE = 1766
7796 XML_SCHEMAP_UNKNOWN_PREFIX = 1767
7797 XML_SCHEMAP_DEF_AND_PREFIX = 1768
7798 XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD = 1769
7799 XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI = 1770
7800 XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI = 1771
7801 XML_SCHEMAP_NOT_SCHEMA = 1772
7802 XML_SCHEMAP_UNKNOWN_MEMBER_TYPE = 1773
7803 XML_SCHEMAP_INVALID_ATTR_USE = 1774
7804 XML_SCHEMAP_RECURSIVE = 1775
7805 XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE = 1776
7806 XML_SCHEMAP_INVALID_ATTR_COMBINATION = 1777
7807 XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION = 1778
7808 XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD = 1779
7809 XML_SCHEMAP_INVALID_ATTR_NAME = 1780
7810 XML_SCHEMAP_REF_AND_CONTENT = 1781
7811 XML_SCHEMAP_CT_PROPS_CORRECT_1 = 1782
7812 XML_SCHEMAP_CT_PROPS_CORRECT_2 = 1783
7813 XML_SCHEMAP_CT_PROPS_CORRECT_3 = 1784
7814 XML_SCHEMAP_CT_PROPS_CORRECT_4 = 1785
7815 XML_SCHEMAP_CT_PROPS_CORRECT_5 = 1786
7816 XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 = 1787
7817 XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 = 1788
7818 XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 = 1789
7819 XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 = 1790
7820 XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3 = 1791
7821 XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER = 1792
7822 XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE = 1793
7823 XML_SCHEMAP_UNION_NOT_EXPRESSIBLE = 1794
7824 XML_SCHEMAP_SRC_IMPORT_3_1 = 1795
7825 XML_SCHEMAP_SRC_IMPORT_3_2 = 1796
7826 XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 = 1797
7827 XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 = 1798
7828 XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 = 1799
7829 XML_SCHEMAP_COS_CT_EXTENDS_1_3 = 1800
7830 XML_SCHEMAV_NOROOT = 1801
7831 XML_SCHEMAV_UNDECLAREDELEM = 1802
7832 XML_SCHEMAV_NOTTOPLEVEL = 1803
7833 XML_SCHEMAV_MISSING = 1804
7834 XML_SCHEMAV_WRONGELEM = 1805
7835 XML_SCHEMAV_NOTYPE = 1806
7836 XML_SCHEMAV_NOROLLBACK = 1807
7837 XML_SCHEMAV_ISABSTRACT = 1808
7838 XML_SCHEMAV_NOTEMPTY = 1809
7839 XML_SCHEMAV_ELEMCONT = 1810
7840 XML_SCHEMAV_HAVEDEFAULT = 1811
7841 XML_SCHEMAV_NOTNILLABLE = 1812
7842 XML_SCHEMAV_EXTRACONTENT = 1813
7843 XML_SCHEMAV_INVALIDATTR = 1814
7844 XML_SCHEMAV_INVALIDELEM = 1815
7845 XML_SCHEMAV_NOTDETERMINIST = 1816
7846 XML_SCHEMAV_CONSTRUCT = 1817
7847 XML_SCHEMAV_INTERNAL = 1818
7848 XML_SCHEMAV_NOTSIMPLE = 1819
7849 XML_SCHEMAV_ATTRUNKNOWN = 1820
7850 XML_SCHEMAV_ATTRINVALID = 1821
7851 XML_SCHEMAV_VALUE = 1822
7852 XML_SCHEMAV_FACET = 1823
7853 XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1 = 1824
7854 XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2 = 1825
7855 XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3 = 1826
7856 XML_SCHEMAV_CVC_TYPE_3_1_1 = 1827
7857 XML_SCHEMAV_CVC_TYPE_3_1_2 = 1828
7858 XML_SCHEMAV_CVC_FACET_VALID = 1829
7859 XML_SCHEMAV_CVC_LENGTH_VALID = 1830
7860 XML_SCHEMAV_CVC_MINLENGTH_VALID = 1831
7861 XML_SCHEMAV_CVC_MAXLENGTH_VALID = 1832
7862 XML_SCHEMAV_CVC_MININCLUSIVE_VALID = 1833
7863 XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID = 1834
7864 XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID = 1835
7865 XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID = 1836
7866 XML_SCHEMAV_CVC_TOTALDIGITS_VALID = 1837
7867 XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID = 1838
7868 XML_SCHEMAV_CVC_PATTERN_VALID = 1839
7869 XML_SCHEMAV_CVC_ENUMERATION_VALID = 1840
7870 XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1 = 1841
7871 XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2 = 1842
7872 XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3 = 1843
7873 XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4 = 1844
7874 XML_SCHEMAV_CVC_ELT_1 = 1845
7875 XML_SCHEMAV_CVC_ELT_2 = 1846
7876 XML_SCHEMAV_CVC_ELT_3_1 = 1847
7877 XML_SCHEMAV_CVC_ELT_3_2_1 = 1848
7878 XML_SCHEMAV_CVC_ELT_3_2_2 = 1849
7879 XML_SCHEMAV_CVC_ELT_4_1 = 1850
7880 XML_SCHEMAV_CVC_ELT_4_2 = 1851
7881 XML_SCHEMAV_CVC_ELT_4_3 = 1852
7882 XML_SCHEMAV_CVC_ELT_5_1_1 = 1853
7883 XML_SCHEMAV_CVC_ELT_5_1_2 = 1854
7884 XML_SCHEMAV_CVC_ELT_5_2_1 = 1855
7885 XML_SCHEMAV_CVC_ELT_5_2_2_1 = 1856
7886 XML_SCHEMAV_CVC_ELT_5_2_2_2_1 = 1857
7887 XML_SCHEMAV_CVC_ELT_5_2_2_2_2 = 1858
7888 XML_SCHEMAV_CVC_ELT_6 = 1859
7889 XML_SCHEMAV_CVC_ELT_7 = 1860
7890 XML_SCHEMAV_CVC_ATTRIBUTE_1 = 1861
7891 XML_SCHEMAV_CVC_ATTRIBUTE_2 = 1862
7892 XML_SCHEMAV_CVC_ATTRIBUTE_3 = 1863
7893 XML_SCHEMAV_CVC_ATTRIBUTE_4 = 1864
7894 XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1 = 1865
7895 XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 = 1866
7896 XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 = 1867
7897 XML_SCHEMAV_CVC_COMPLEX_TYPE_4 = 1868
7898 XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1 = 1869
7899 XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2 = 1870
7900 XML_SCHEMAV_ELEMENT_CONTENT = 1871
7901 XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING = 1872
7902 XML_SCHEMAV_CVC_COMPLEX_TYPE_1 = 1873
7903 XML_SCHEMAV_CVC_AU = 1874
7904 XML_SCHEMAV_CVC_TYPE_1 = 1875
7905 XML_SCHEMAV_CVC_TYPE_2 = 1876
7906 XML_SCHEMAV_CVC_IDC = 1877
7907 XML_SCHEMAV_CVC_WILDCARD = 1878
7908 XML_SCHEMAV_MISC = 1879
7909 XML_XPTR_UNKNOWN_SCHEME = 1900
7910 XML_XPTR_CHILDSEQ_START = 1901
7911 XML_XPTR_EVAL_FAILED = 1902
7912 XML_XPTR_EXTRA_OBJECTS = 1903
7913 XML_C14N_CREATE_CTXT = 1950
7914 XML_C14N_REQUIRES_UTF8 = 1951
7915 XML_C14N_CREATE_STACK = 1952
7916 XML_C14N_INVALID_NODE = 1953
7917 XML_C14N_UNKNOW_NODE = 1954
7918 XML_C14N_RELATIVE_NAMESPACE = 1955
7919 XML_FTP_PASV_ANSWER = 2000
7920 XML_FTP_EPSV_ANSWER = 2001
7921 XML_FTP_ACCNT = 2002
7922 XML_FTP_URL_SYNTAX = 2003
7923 XML_HTTP_URL_SYNTAX = 2020
7924 XML_HTTP_USE_IP = 2021
7925 XML_HTTP_UNKNOWN_HOST = 2022
7926 XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000
7927 XML_SCHEMAP_SRC_SIMPLE_TYPE_2 = 3001
7928 XML_SCHEMAP_SRC_SIMPLE_TYPE_3 = 3002
7929 XML_SCHEMAP_SRC_SIMPLE_TYPE_4 = 3003
7930 XML_SCHEMAP_SRC_RESOLVE = 3004
7931 XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE = 3005
7932 XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE = 3006
7933 XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES = 3007
7934 XML_SCHEMAP_ST_PROPS_CORRECT_1 = 3008
7935 XML_SCHEMAP_ST_PROPS_CORRECT_2 = 3009
7936 XML_SCHEMAP_ST_PROPS_CORRECT_3 = 3010
7937 XML_SCHEMAP_COS_ST_RESTRICTS_1_1 = 3011
7938 XML_SCHEMAP_COS_ST_RESTRICTS_1_2 = 3012
7939 XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1 = 3013
7940 XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2 = 3014
7941 XML_SCHEMAP_COS_ST_RESTRICTS_2_1 = 3015
7942 XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 = 3016
7943 XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 = 3017
7944 XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 = 3018
7945 XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 = 3019
7946 XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 = 3020
7947 XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 = 3021
7948 XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 = 3022
7949 XML_SCHEMAP_COS_ST_RESTRICTS_3_1 = 3023
7950 XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1 = 3024
7951 XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 = 3025
7952 XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 = 3026
7953 XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 = 3027
7954 XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 = 3028
7955 XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 = 3029
7956 XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 = 3030
7957 XML_SCHEMAP_COS_ST_DERIVED_OK_2_1 = 3031
7958 XML_SCHEMAP_COS_ST_DERIVED_OK_2_2 = 3032
7959 XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED = 3033
7960 XML_SCHEMAP_S4S_ELEM_MISSING = 3034
7961 XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED = 3035
7962 XML_SCHEMAP_S4S_ATTR_MISSING = 3036
7963 XML_SCHEMAP_S4S_ATTR_INVALID_VALUE = 3037
7964 XML_SCHEMAP_SRC_ELEMENT_1 = 3038
7965 XML_SCHEMAP_SRC_ELEMENT_2_1 = 3039
7966 XML_SCHEMAP_SRC_ELEMENT_2_2 = 3040
7967 XML_SCHEMAP_SRC_ELEMENT_3 = 3041
7968 XML_SCHEMAP_P_PROPS_CORRECT_1 = 3042
7969 XML_SCHEMAP_P_PROPS_CORRECT_2_1 = 3043
7970 XML_SCHEMAP_P_PROPS_CORRECT_2_2 = 3044
7971 XML_SCHEMAP_E_PROPS_CORRECT_2 = 3045
7972 XML_SCHEMAP_E_PROPS_CORRECT_3 = 3046
7973 XML_SCHEMAP_E_PROPS_CORRECT_4 = 3047
7974 XML_SCHEMAP_E_PROPS_CORRECT_5 = 3048
7975 XML_SCHEMAP_E_PROPS_CORRECT_6 = 3049
7976 XML_SCHEMAP_SRC_INCLUDE = 3050
7977 XML_SCHEMAP_SRC_ATTRIBUTE_1 = 3051
7978 XML_SCHEMAP_SRC_ATTRIBUTE_2 = 3052
7979 XML_SCHEMAP_SRC_ATTRIBUTE_3_1 = 3053
7980 XML_SCHEMAP_SRC_ATTRIBUTE_3_2 = 3054
7981 XML_SCHEMAP_SRC_ATTRIBUTE_4 = 3055
7982 XML_SCHEMAP_NO_XMLNS = 3056
7983 XML_SCHEMAP_NO_XSI = 3057
7984 XML_SCHEMAP_COS_VALID_DEFAULT_1 = 3058
7985 XML_SCHEMAP_COS_VALID_DEFAULT_2_1 = 3059
7986 XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1 = 3060
7987 XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2 = 3061
7988 XML_SCHEMAP_CVC_SIMPLE_TYPE = 3062
7989 XML_SCHEMAP_COS_CT_EXTENDS_1_1 = 3063
7990 XML_SCHEMAP_SRC_IMPORT_1_1 = 3064
7991 XML_SCHEMAP_SRC_IMPORT_1_2 = 3065
7992 XML_SCHEMAP_SRC_IMPORT_2 = 3066
7993 XML_SCHEMAP_SRC_IMPORT_2_1 = 3067
7994 XML_SCHEMAP_SRC_IMPORT_2_2 = 3068
7995 XML_SCHEMAP_INTERNAL = 3069
7996 XML_SCHEMAP_NOT_DETERMINISTIC = 3070
7997 XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 = 3071
7998 XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2 = 3072
7999 XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3 = 3073
8000 XML_SCHEMAP_MG_PROPS_CORRECT_1 = 3074
8001 XML_SCHEMAP_MG_PROPS_CORRECT_2 = 3075
8002 XML_SCHEMAP_SRC_CT_1 = 3076
8003 XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 = 3077
8004 XML_SCHEMAP_AU_PROPS_CORRECT_2 = 3078
8005 XML_SCHEMAP_A_PROPS_CORRECT_2 = 3079
8006 XML_SCHEMAP_C_PROPS_CORRECT = 3080
8007 XML_SCHEMAP_SRC_REDEFINE = 3081
8008 XML_SCHEMAP_SRC_IMPORT = 3082
8009 XML_SCHEMAP_WARN_SKIP_SCHEMA = 3083
8010 XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084
8011 XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085
8012 XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086
8013 XML_SCHEMAP_AG_PROPS_CORRECT = 3087
8014 XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088
8015 XML_SCHEMAP_AU_PROPS_CORRECT = 3089
8016 XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090
8017 XML_SCHEMAP_COS_ALL_LIMITED = 3091
8018 XML_SCHEMATRONV_ASSERT = 4000
8019 XML_SCHEMATRONV_REPORT = 4001
8020 XML_MODULE_OPEN = 4900
8021 XML_MODULE_CLOSE = 4901
8022 XML_CHECK_FOUND_ELEMENT = 5000
8023 XML_CHECK_FOUND_ATTRIBUTE = 5001
8024 XML_CHECK_FOUND_TEXT = 5002
8025 XML_CHECK_FOUND_CDATA = 5003
8026 XML_CHECK_FOUND_ENTITYREF = 5004
8027 XML_CHECK_FOUND_ENTITY = 5005
8028 XML_CHECK_FOUND_PI = 5006
8029 XML_CHECK_FOUND_COMMENT = 5007
8030 XML_CHECK_FOUND_DOCTYPE = 5008
8031 XML_CHECK_FOUND_FRAGMENT = 5009
8032 XML_CHECK_FOUND_NOTATION = 5010
8033 XML_CHECK_UNKNOWN_NODE = 5011
8034 XML_CHECK_ENTITY_TYPE = 5012
8035 XML_CHECK_NO_PARENT = 5013
8036 XML_CHECK_NO_DOC = 5014
8037 XML_CHECK_NO_NAME = 5015
8038 XML_CHECK_NO_ELEM = 5016
8039 XML_CHECK_WRONG_DOC = 5017
8040 XML_CHECK_NO_PREV = 5018
8041 XML_CHECK_WRONG_PREV = 5019
8042 XML_CHECK_NO_NEXT = 5020
8043 XML_CHECK_WRONG_NEXT = 5021
8044 XML_CHECK_NOT_DTD = 5022
8045 XML_CHECK_NOT_ATTR = 5023
8046 XML_CHECK_NOT_ATTR_DECL = 5024
8047 XML_CHECK_NOT_ELEM_DECL = 5025
8048 XML_CHECK_NOT_ENTITY_DECL = 5026
8049 XML_CHECK_NOT_NS_DECL = 5027
8050 XML_CHECK_NO_HREF = 5028
8051 XML_CHECK_WRONG_PARENT = 5029
8052 XML_CHECK_NS_SCOPE = 5030
8053 XML_CHECK_NS_ANCESTOR = 5031
8054 XML_CHECK_NOT_UTF8 = 5032
8055 XML_CHECK_NO_DICT = 5033
8056 XML_CHECK_NOT_NCNAME = 5034
8057 XML_CHECK_OUTSIDE_DICT = 5035
8058 XML_CHECK_WRONG_NAME = 5036
8059 XML_CHECK_NAME_NOT_NULL = 5037
8060 XML_I18N_NO_NAME = 6000
8061 XML_I18N_NO_HANDLER = 6001
8062 XML_I18N_EXCESS_HANDLER = 6002
8063 XML_I18N_CONV_FAILED = 6003
8064 XML_I18N_NO_OUTPUT = 6004
8065 XML_BUF_OVERFLOW = 7000
8075 # xmlElementContentType
8076 XML_ELEMENT_CONTENT_PCDATA = 1
8077 XML_ELEMENT_CONTENT_ELEMENT = 2
8078 XML_ELEMENT_CONTENT_SEQ = 3
8079 XML_ELEMENT_CONTENT_OR = 4
8081 # xmlParserProperties
8082 XML_PARSER_LOADDTD = 1
8083 XML_PARSER_DEFAULTATTRS = 2
8084 XML_PARSER_VALIDATE = 3
8085 XML_PARSER_SUBST_ENTITIES = 4
8088 XML_READER_TYPE_NONE = 0
8089 XML_READER_TYPE_ELEMENT = 1
8090 XML_READER_TYPE_ATTRIBUTE = 2
8091 XML_READER_TYPE_TEXT = 3
8092 XML_READER_TYPE_CDATA = 4
8093 XML_READER_TYPE_ENTITY_REFERENCE = 5
8094 XML_READER_TYPE_ENTITY = 6
8095 XML_READER_TYPE_PROCESSING_INSTRUCTION = 7
8096 XML_READER_TYPE_COMMENT = 8
8097 XML_READER_TYPE_DOCUMENT = 9
8098 XML_READER_TYPE_DOCUMENT_TYPE = 10
8099 XML_READER_TYPE_DOCUMENT_FRAGMENT = 11
8100 XML_READER_TYPE_NOTATION = 12
8101 XML_READER_TYPE_WHITESPACE = 13
8102 XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14
8103 XML_READER_TYPE_END_ELEMENT = 15
8104 XML_READER_TYPE_END_ENTITY = 16
8105 XML_READER_TYPE_XML_DECLARATION = 17
8108 XML_CATA_PREFER_NONE = 0
8109 XML_CATA_PREFER_PUBLIC = 1
8110 XML_CATA_PREFER_SYSTEM = 2
8113 XML_ELEMENT_NODE = 1
8114 XML_ATTRIBUTE_NODE = 2
8116 XML_CDATA_SECTION_NODE = 4
8117 XML_ENTITY_REF_NODE = 5
8120 XML_COMMENT_NODE = 8
8121 XML_DOCUMENT_NODE = 9
8122 XML_DOCUMENT_TYPE_NODE = 10
8123 XML_DOCUMENT_FRAG_NODE = 11
8124 XML_NOTATION_NODE = 12
8125 XML_HTML_DOCUMENT_NODE = 13
8127 XML_ELEMENT_DECL = 15
8128 XML_ATTRIBUTE_DECL = 16
8129 XML_ENTITY_DECL = 17
8130 XML_NAMESPACE_DECL = 18
8131 XML_XINCLUDE_START = 19
8132 XML_XINCLUDE_END = 20
8133 XML_DOCB_DOCUMENT_NODE = 21
8136 XLINK_ACTUATE_NONE = 0
8137 XLINK_ACTUATE_AUTO = 1
8138 XLINK_ACTUATE_ONREQUEST = 2
8146 XML_WITH_PATTERN = 6
8153 XML_WITH_LEGACY = 13
8155 XML_WITH_CATALOG = 15
8158 XML_WITH_XINCLUDE = 18
8160 XML_WITH_ISO8859X = 20
8161 XML_WITH_UNICODE = 21
8162 XML_WITH_REGEXP = 22
8163 XML_WITH_AUTOMATA = 23
8165 XML_WITH_SCHEMAS = 25
8166 XML_WITH_SCHEMATRON = 26
8167 XML_WITH_MODULES = 27
8169 XML_WITH_DEBUG_MEM = 29
8170 XML_WITH_DEBUG_RUN = 30
8174 XML_WITH_NONE = 99999
8176 # xmlElementContentOccur
8177 XML_ELEMENT_CONTENT_ONCE = 1
8178 XML_ELEMENT_CONTENT_OPT = 2
8179 XML_ELEMENT_CONTENT_MULT = 3
8180 XML_ELEMENT_CONTENT_PLUS = 4
8183 XPATH_EXPRESSION_OK = 0
8184 XPATH_NUMBER_ERROR = 1
8185 XPATH_UNFINISHED_LITERAL_ERROR = 2
8186 XPATH_START_LITERAL_ERROR = 3
8187 XPATH_VARIABLE_REF_ERROR = 4
8188 XPATH_UNDEF_VARIABLE_ERROR = 5
8189 XPATH_INVALID_PREDICATE_ERROR = 6
8190 XPATH_EXPR_ERROR = 7
8191 XPATH_UNCLOSED_ERROR = 8
8192 XPATH_UNKNOWN_FUNC_ERROR = 9
8193 XPATH_INVALID_OPERAND = 10
8194 XPATH_INVALID_TYPE = 11
8195 XPATH_INVALID_ARITY = 12
8196 XPATH_INVALID_CTXT_SIZE = 13
8197 XPATH_INVALID_CTXT_POSITION = 14
8198 XPATH_MEMORY_ERROR = 15
8199 XPTR_SYNTAX_ERROR = 16
8200 XPTR_RESOURCE_ERROR = 17
8201 XPTR_SUB_RESOURCE_ERROR = 18
8202 XPATH_UNDEF_PREFIX_ERROR = 19
8203 XPATH_ENCODING_ERROR = 20
8204 XPATH_INVALID_CHAR_ERROR = 21
8205 XPATH_INVALID_CTXT = 22
8206 XPATH_STACK_ERROR = 23
8207 XPATH_FORBID_VARIABLE_ERROR = 24
8210 XML_TEXTREADER_MODE_INITIAL = 0
8211 XML_TEXTREADER_MODE_INTERACTIVE = 1
8212 XML_TEXTREADER_MODE_ERROR = 2
8213 XML_TEXTREADER_MODE_EOF = 3
8214 XML_TEXTREADER_MODE_CLOSED = 4
8215 XML_TEXTREADER_MODE_READING = 5
8224 XML_CHAR_ENCODING_ERROR = -1
8225 XML_CHAR_ENCODING_NONE = 0
8226 XML_CHAR_ENCODING_UTF8 = 1
8227 XML_CHAR_ENCODING_UTF16LE = 2
8228 XML_CHAR_ENCODING_UTF16BE = 3
8229 XML_CHAR_ENCODING_UCS4LE = 4
8230 XML_CHAR_ENCODING_UCS4BE = 5
8231 XML_CHAR_ENCODING_EBCDIC = 6
8232 XML_CHAR_ENCODING_UCS4_2143 = 7
8233 XML_CHAR_ENCODING_UCS4_3412 = 8
8234 XML_CHAR_ENCODING_UCS2 = 9
8235 XML_CHAR_ENCODING_8859_1 = 10
8236 XML_CHAR_ENCODING_8859_2 = 11
8237 XML_CHAR_ENCODING_8859_3 = 12
8238 XML_CHAR_ENCODING_8859_4 = 13
8239 XML_CHAR_ENCODING_8859_5 = 14
8240 XML_CHAR_ENCODING_8859_6 = 15
8241 XML_CHAR_ENCODING_8859_7 = 16
8242 XML_CHAR_ENCODING_8859_8 = 17
8243 XML_CHAR_ENCODING_8859_9 = 18
8244 XML_CHAR_ENCODING_2022_JP = 19
8245 XML_CHAR_ENCODING_SHIFT_JIS = 20
8246 XML_CHAR_ENCODING_EUC_JP = 21
8247 XML_CHAR_ENCODING_ASCII = 22
8253 XML_FROM_NAMESPACE = 3
8261 XML_FROM_XINCLUDE = 11
8263 XML_FROM_XPOINTER = 13
8264 XML_FROM_REGEXP = 14
8265 XML_FROM_DATATYPE = 15
8266 XML_FROM_SCHEMASP = 16
8267 XML_FROM_SCHEMASV = 17
8268 XML_FROM_RELAXNGP = 18
8269 XML_FROM_RELAXNGV = 19
8270 XML_FROM_CATALOG = 20
8275 XML_FROM_WRITER = 25
8276 XML_FROM_MODULE = 26
8278 XML_FROM_SCHEMATRONV = 28
8279 XML_FROM_BUFFER = 29
8289 # xmlSchemaValidOption
8290 XML_SCHEMA_VAL_VC_I_CREATE = 1
8292 # xmlSchemaWhitespaceValueType
8293 XML_SCHEMA_WHITESPACE_UNKNOWN = 0
8294 XML_SCHEMA_WHITESPACE_PRESERVE = 1
8295 XML_SCHEMA_WHITESPACE_REPLACE = 2
8296 XML_SCHEMA_WHITESPACE_COLLAPSE = 3
8299 HTML_PARSE_RECOVER = 1
8300 HTML_PARSE_NODEFDTD = 4
8301 HTML_PARSE_NOERROR = 32
8302 HTML_PARSE_NOWARNING = 64
8303 HTML_PARSE_PEDANTIC = 128
8304 HTML_PARSE_NOBLANKS = 256
8305 HTML_PARSE_NONET = 2048
8306 HTML_PARSE_NOIMPLIED = 8192
8307 HTML_PARSE_COMPACT = 65536
8308 HTML_PARSE_IGNORE_ENC = 2097152
8310 # xmlRelaxNGValidErr
8312 XML_RELAXNG_ERR_MEMORY = 1
8313 XML_RELAXNG_ERR_TYPE = 2
8314 XML_RELAXNG_ERR_TYPEVAL = 3
8315 XML_RELAXNG_ERR_DUPID = 4
8316 XML_RELAXNG_ERR_TYPECMP = 5
8317 XML_RELAXNG_ERR_NOSTATE = 6
8318 XML_RELAXNG_ERR_NODEFINE = 7
8319 XML_RELAXNG_ERR_LISTEXTRA = 8
8320 XML_RELAXNG_ERR_LISTEMPTY = 9
8321 XML_RELAXNG_ERR_INTERNODATA = 10
8322 XML_RELAXNG_ERR_INTERSEQ = 11
8323 XML_RELAXNG_ERR_INTEREXTRA = 12
8324 XML_RELAXNG_ERR_ELEMNAME = 13
8325 XML_RELAXNG_ERR_ATTRNAME = 14
8326 XML_RELAXNG_ERR_ELEMNONS = 15
8327 XML_RELAXNG_ERR_ATTRNONS = 16
8328 XML_RELAXNG_ERR_ELEMWRONGNS = 17
8329 XML_RELAXNG_ERR_ATTRWRONGNS = 18
8330 XML_RELAXNG_ERR_ELEMEXTRANS = 19
8331 XML_RELAXNG_ERR_ATTREXTRANS = 20
8332 XML_RELAXNG_ERR_ELEMNOTEMPTY = 21
8333 XML_RELAXNG_ERR_NOELEM = 22
8334 XML_RELAXNG_ERR_NOTELEM = 23
8335 XML_RELAXNG_ERR_ATTRVALID = 24
8336 XML_RELAXNG_ERR_CONTENTVALID = 25
8337 XML_RELAXNG_ERR_EXTRACONTENT = 26
8338 XML_RELAXNG_ERR_INVALIDATTR = 27
8339 XML_RELAXNG_ERR_DATAELEM = 28
8340 XML_RELAXNG_ERR_VALELEM = 29
8341 XML_RELAXNG_ERR_LISTELEM = 30
8342 XML_RELAXNG_ERR_DATATYPE = 31
8343 XML_RELAXNG_ERR_VALUE = 32
8344 XML_RELAXNG_ERR_LIST = 33
8345 XML_RELAXNG_ERR_NOGRAMMAR = 34
8346 XML_RELAXNG_ERR_EXTRADATA = 35
8347 XML_RELAXNG_ERR_LACKDATA = 36
8348 XML_RELAXNG_ERR_INTERNAL = 37
8349 XML_RELAXNG_ERR_ELEMWRONG = 38
8350 XML_RELAXNG_ERR_TEXTWRONG = 39
8353 XML_CATA_ALLOW_NONE = 0
8354 XML_CATA_ALLOW_GLOBAL = 1
8355 XML_CATA_ALLOW_DOCUMENT = 2
8356 XML_CATA_ALLOW_ALL = 3
8359 XML_ATTRIBUTE_CDATA = 1
8360 XML_ATTRIBUTE_ID = 2
8361 XML_ATTRIBUTE_IDREF = 3
8362 XML_ATTRIBUTE_IDREFS = 4
8363 XML_ATTRIBUTE_ENTITY = 5
8364 XML_ATTRIBUTE_ENTITIES = 6
8365 XML_ATTRIBUTE_NMTOKEN = 7
8366 XML_ATTRIBUTE_NMTOKENS = 8
8367 XML_ATTRIBUTE_ENUMERATION = 9
8368 XML_ATTRIBUTE_NOTATION = 10
8370 # xmlSchematronValidOptions
8371 XML_SCHEMATRON_OUT_QUIET = 1
8372 XML_SCHEMATRON_OUT_TEXT = 2
8373 XML_SCHEMATRON_OUT_XML = 4
8374 XML_SCHEMATRON_OUT_ERROR = 8
8375 XML_SCHEMATRON_OUT_FILE = 256
8376 XML_SCHEMATRON_OUT_BUFFER = 512
8377 XML_SCHEMATRON_OUT_IO = 1024
8379 # xmlSchemaContentType
8380 XML_SCHEMA_CONTENT_UNKNOWN = 0
8381 XML_SCHEMA_CONTENT_EMPTY = 1
8382 XML_SCHEMA_CONTENT_ELEMENTS = 2
8383 XML_SCHEMA_CONTENT_MIXED = 3
8384 XML_SCHEMA_CONTENT_SIMPLE = 4
8385 XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS = 5
8386 XML_SCHEMA_CONTENT_BASIC = 6
8387 XML_SCHEMA_CONTENT_ANY = 7
8390 XML_SCHEMA_TYPE_BASIC = 1
8391 XML_SCHEMA_TYPE_ANY = 2
8392 XML_SCHEMA_TYPE_FACET = 3
8393 XML_SCHEMA_TYPE_SIMPLE = 4
8394 XML_SCHEMA_TYPE_COMPLEX = 5
8395 XML_SCHEMA_TYPE_SEQUENCE = 6
8396 XML_SCHEMA_TYPE_CHOICE = 7
8397 XML_SCHEMA_TYPE_ALL = 8
8398 XML_SCHEMA_TYPE_SIMPLE_CONTENT = 9
8399 XML_SCHEMA_TYPE_COMPLEX_CONTENT = 10
8400 XML_SCHEMA_TYPE_UR = 11
8401 XML_SCHEMA_TYPE_RESTRICTION = 12
8402 XML_SCHEMA_TYPE_EXTENSION = 13
8403 XML_SCHEMA_TYPE_ELEMENT = 14
8404 XML_SCHEMA_TYPE_ATTRIBUTE = 15
8405 XML_SCHEMA_TYPE_ATTRIBUTEGROUP = 16
8406 XML_SCHEMA_TYPE_GROUP = 17
8407 XML_SCHEMA_TYPE_NOTATION = 18
8408 XML_SCHEMA_TYPE_LIST = 19
8409 XML_SCHEMA_TYPE_UNION = 20
8410 XML_SCHEMA_TYPE_ANY_ATTRIBUTE = 21
8411 XML_SCHEMA_TYPE_IDC_UNIQUE = 22
8412 XML_SCHEMA_TYPE_IDC_KEY = 23
8413 XML_SCHEMA_TYPE_IDC_KEYREF = 24
8414 XML_SCHEMA_TYPE_PARTICLE = 25
8415 XML_SCHEMA_TYPE_ATTRIBUTE_USE = 26
8416 XML_SCHEMA_FACET_MININCLUSIVE = 1000
8417 XML_SCHEMA_FACET_MINEXCLUSIVE = 1001
8418 XML_SCHEMA_FACET_MAXINCLUSIVE = 1002
8419 XML_SCHEMA_FACET_MAXEXCLUSIVE = 1003
8420 XML_SCHEMA_FACET_TOTALDIGITS = 1004
8421 XML_SCHEMA_FACET_FRACTIONDIGITS = 1005
8422 XML_SCHEMA_FACET_PATTERN = 1006
8423 XML_SCHEMA_FACET_ENUMERATION = 1007
8424 XML_SCHEMA_FACET_WHITESPACE = 1008
8425 XML_SCHEMA_FACET_LENGTH = 1009
8426 XML_SCHEMA_FACET_MAXLENGTH = 1010
8427 XML_SCHEMA_FACET_MINLENGTH = 1011
8428 XML_SCHEMA_EXTRA_QNAMEREF = 2000
8429 XML_SCHEMA_EXTRA_ATTR_USE_PROHIB = 2001
8433 XML_MODULE_LOCAL = 2
8436 XML_PARSE_UNKNOWN = 0
8439 XML_PARSE_PUSH_DOM = 3
8440 XML_PARSE_PUSH_SAX = 4
8441 XML_PARSE_READER = 5
8445 XML_C14N_EXCLUSIVE_1_0 = 1
8449 XML_PARSE_RECOVER = 1
8451 XML_PARSE_DTDLOAD = 4
8452 XML_PARSE_DTDATTR = 8
8453 XML_PARSE_DTDVALID = 16
8454 XML_PARSE_NOERROR = 32
8455 XML_PARSE_NOWARNING = 64
8456 XML_PARSE_PEDANTIC = 128
8457 XML_PARSE_NOBLANKS = 256
8458 XML_PARSE_SAX1 = 512
8459 XML_PARSE_XINCLUDE = 1024
8460 XML_PARSE_NONET = 2048
8461 XML_PARSE_NODICT = 4096
8462 XML_PARSE_NSCLEAN = 8192
8463 XML_PARSE_NOCDATA = 16384
8464 XML_PARSE_NOXINCNODE = 32768
8465 XML_PARSE_COMPACT = 65536
8466 XML_PARSE_OLD10 = 131072
8467 XML_PARSE_NOBASEFIX = 262144
8468 XML_PARSE_HUGE = 524288
8469 XML_PARSE_OLDSAX = 1048576
8470 XML_PARSE_IGNORE_ENC = 2097152
8471 XML_PARSE_BIG_LINES = 4194304
8474 XML_ELEMENT_TYPE_UNDEFINED = 0
8475 XML_ELEMENT_TYPE_EMPTY = 1
8476 XML_ELEMENT_TYPE_ANY = 2
8477 XML_ELEMENT_TYPE_MIXED = 3
8478 XML_ELEMENT_TYPE_ELEMENT = 4
8481 XML_DOC_WELLFORMED = 1
8484 XML_DOC_DTDVALID = 8
8485 XML_DOC_XINCLUDE = 16
8486 XML_DOC_USERBUILT = 32
8487 XML_DOC_INTERNAL = 64
8492 XLINK_TYPE_SIMPLE = 1
8493 XLINK_TYPE_EXTENDED = 2
8494 XLINK_TYPE_EXTENDED_SET = 3
8496 # xmlXPathObjectType
8504 XPATH_LOCATIONSET = 7
8508 # xmlSchemaValidError
8509 XML_SCHEMAS_ERR_OK = 0
8510 XML_SCHEMAS_ERR_NOROOT = 1
8511 XML_SCHEMAS_ERR_UNDECLAREDELEM = 2
8512 XML_SCHEMAS_ERR_NOTTOPLEVEL = 3
8513 XML_SCHEMAS_ERR_MISSING = 4
8514 XML_SCHEMAS_ERR_WRONGELEM = 5
8515 XML_SCHEMAS_ERR_NOTYPE = 6
8516 XML_SCHEMAS_ERR_NOROLLBACK = 7
8517 XML_SCHEMAS_ERR_ISABSTRACT = 8
8518 XML_SCHEMAS_ERR_NOTEMPTY = 9
8519 XML_SCHEMAS_ERR_ELEMCONT = 10
8520 XML_SCHEMAS_ERR_HAVEDEFAULT = 11
8521 XML_SCHEMAS_ERR_NOTNILLABLE = 12
8522 XML_SCHEMAS_ERR_EXTRACONTENT = 13
8523 XML_SCHEMAS_ERR_INVALIDATTR = 14
8524 XML_SCHEMAS_ERR_INVALIDELEM = 15
8525 XML_SCHEMAS_ERR_NOTDETERMINIST = 16
8526 XML_SCHEMAS_ERR_CONSTRUCT = 17
8527 XML_SCHEMAS_ERR_INTERNAL = 18
8528 XML_SCHEMAS_ERR_NOTSIMPLE = 19
8529 XML_SCHEMAS_ERR_ATTRUNKNOWN = 20
8530 XML_SCHEMAS_ERR_ATTRINVALID = 21
8531 XML_SCHEMAS_ERR_VALUE = 22
8532 XML_SCHEMAS_ERR_FACET = 23
8533 XML_SCHEMAS_ERR_ = 24
8534 XML_SCHEMAS_ERR_XXX = 25