INSTRUCTION stringlengths 1 8.43k | RESPONSE stringlengths 75 104k |
|---|---|
parse an XML in - memory document and build a tree. This reuses the existing | def htmlCtxtReadDoc(self, cur, URL, encoding, options):
"""parse an XML in-memory document and build a tree. This
reuses the existing @ctxt parser context """
ret = libxml2mod.htmlCtxtReadDoc(self._o, cur, URL, encoding, options)
if ret is None:raise treeError('htmlCtxtReadDoc() faile... |
parse an XML from a file descriptor and build a tree. This reuses the existing | def htmlCtxtReadFd(self, fd, URL, encoding, options):
"""parse an XML from a file descriptor and build a tree. This
reuses the existing @ctxt parser context """
ret = libxml2mod.htmlCtxtReadFd(self._o, fd, URL, encoding, options)
if ret is None:raise treeError('htmlCtxtReadFd() failed... |
parse an XML file from the filesystem or the network. This reuses the existing | def htmlCtxtReadFile(self, filename, encoding, options):
"""parse an XML file from the filesystem or the network. This
reuses the existing @ctxt parser context """
ret = libxml2mod.htmlCtxtReadFile(self._o, filename, encoding, options)
if ret is None:raise treeError('htmlCtxtReadFile(... |
Applies the options to the parser context | def htmlCtxtUseOptions(self, options):
"""Applies the options to the parser context """
ret = libxml2mod.htmlCtxtUseOptions(self._o, options)
return ret |
Parse a Chunk of memory | def htmlParseChunk(self, chunk, size, terminate):
"""Parse a Chunk of memory """
ret = libxml2mod.htmlParseChunk(self._o, chunk, size, terminate)
return ret |
parse an XML file from the filesystem or the network. This reuses the existing | def ctxtReadFile(self, filename, encoding, options):
"""parse an XML file from the filesystem or the network. This
reuses the existing @ctxt parser context """
ret = libxml2mod.xmlCtxtReadFile(self._o, filename, encoding, options)
if ret is None:raise treeError('xmlCtxtReadFile() fail... |
parse an XML in - memory document and build a tree. This reuses the existing | def ctxtReadMemory(self, buffer, size, URL, encoding, options):
"""parse an XML in-memory document and build a tree. This
reuses the existing @ctxt parser context """
ret = libxml2mod.xmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
if ret is None:raise treeError('xmlC... |
Reset a push parser context | def ctxtResetPush(self, chunk, size, filename, encoding):
"""Reset a push parser context """
ret = libxml2mod.xmlCtxtResetPush(self._o, chunk, size, filename, encoding)
return ret |
Applies the options to the parser context | def ctxtUseOptions(self, options):
"""Applies the options to the parser context """
ret = libxml2mod.xmlCtxtUseOptions(self._o, options)
return ret |
Parse a Chunk of memory | def parseChunk(self, chunk, size, terminate):
"""Parse a Chunk of memory """
ret = libxml2mod.xmlParseChunk(self._o, chunk, size, terminate)
return ret |
Setup the parser context to parse a new buffer ; Clears any prior contents from the parser context. The buffer parameter must not be None but the filename parameter can be | def setupParserForBuffer(self, buffer, filename):
"""Setup the parser context to parse a new buffer; Clears any
prior contents from the parser context. The buffer
parameter must not be None, but the filename parameter can
be """
libxml2mod.xmlSetupParserForBuffer(self._o, ... |
This function is deprecated we now always process entities content through xmlStringDecodeEntities TODO: remove it in next major release. [ 67 ] Reference:: = EntityRef | CharRef [ 69 ] PEReference:: = % Name ; | def decodeEntities(self, len, what, end, end2, end3):
"""This function is deprecated, we now always process entities
content through xmlStringDecodeEntities TODO: remove it in
next major release. [67] Reference ::= EntityRef | CharRef
[69] PEReference ::= '%' Name ';' """
... |
Default handling of defined entities when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point. | def handleEntity(self, entity):
"""Default handling of defined entities, when should we define
a new input stream ? When do we just handle that as a set
of chars ? OBSOLETE: to be removed at some point. """
if entity is None: entity__o = None
else: entity__o = entity._o
... |
parse ENTITY references declarations [ 68 ] EntityRef:: = & Name ; [ WFC: Entity Declared ] In a document without any DTD a document with only an internal DTD subset which contains no parameter entity references or a document with standalone = yes the Name given in the entity reference must match that in an entity decl... | def parseEntityRef(self):
"""parse ENTITY references declarations [68] EntityRef ::=
'&' Name ';' [ WFC: Entity Declared ] In a document
without any DTD, a document with only an internal DTD
subset which contains no parameter entity references, or a
document with "stand... |
parse Markup declarations from an external subset [ 30 ] extSubset:: = textDecl? extSubsetDecl [ 31 ] extSubsetDecl:: = ( markupdecl | conditionalSect | PEReference | S ) * | def parseExternalSubset(self, ExternalID, SystemID):
"""parse Markup declarations from an external subset [30]
extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl
::= (markupdecl | conditionalSect | PEReference | S) * """
libxml2mod.xmlParseExternalSubset(self._o, ExternalID,... |
Takes a entity string content and process to do the adequate substitutions. [ 67 ] Reference:: = EntityRef | CharRef [ 69 ] PEReference:: = % Name ; | def stringDecodeEntities(self, str, what, end, end2, end3):
"""Takes a entity string content and process to do the
adequate substitutions. [67] Reference ::= EntityRef |
CharRef [69] PEReference ::= '%' Name ';' """
ret = libxml2mod.xmlStringDecodeEntities(self._o, str, what, end,... |
Takes a entity string content and process to do the adequate substitutions. [ 67 ] Reference:: = EntityRef | CharRef [ 69 ] PEReference:: = % Name ; | def stringLenDecodeEntities(self, str, len, what, end, end2, end3):
"""Takes a entity string content and process to do the
adequate substitutions. [67] Reference ::= EntityRef |
CharRef [69] PEReference ::= '%' Name ';' """
ret = libxml2mod.xmlStringLenDecodeEntities(self._o, str,... |
Dumps debug information for the attribute | def debugDumpAttr(self, output, depth):
"""Dumps debug information for the attribute """
libxml2mod.xmlDebugDumpAttr(output, self._o, depth) |
Dumps debug information for the attribute list | def debugDumpAttrList(self, output, depth):
"""Dumps debug information for the attribute list """
libxml2mod.xmlDebugDumpAttrList(output, self._o, depth) |
Do a copy of the attribute. | def copyProp(self, target):
"""Do a copy of the attribute. """
if target is None: target__o = None
else: target__o = target._o
ret = libxml2mod.xmlCopyProp(target__o, self._o)
if ret is None:raise treeError('xmlCopyProp() failed')
__tmp = xmlAttr(_obj=ret)
return ... |
Do a copy of an attribute list. | def copyPropList(self, target):
"""Do a copy of an attribute list. """
if target is None: target__o = None
else: target__o = target._o
ret = libxml2mod.xmlCopyPropList(target__o, self._o)
if ret is None:raise treeError('xmlCopyPropList() failed')
__tmp = xmlAttr(_obj=ret)... |
Remove the given attribute from the ID table maintained internally. | def removeID(self, doc):
"""Remove the given attribute from the ID table maintained
internally. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlRemoveID(doc__o, self._o)
return ret |
Remove the given attribute from the Ref table maintained internally. | def removeRef(self, doc):
"""Remove the given attribute from the Ref table maintained
internally. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlRemoveRef(doc__o, self._o)
return ret |
Add an entry in the catalog it may overwrite existing but different entries. | def add(self, type, orig, replace):
"""Add an entry in the catalog, it may overwrite existing but
different entries. """
ret = libxml2mod.xmlACatalogAdd(self._o, type, orig, replace)
return ret |
Remove an entry from the catalog | def remove(self, value):
"""Remove an entry from the catalog """
ret = libxml2mod.xmlACatalogRemove(self._o, value)
return ret |
Do a complete resolution lookup of an External Identifier | def resolve(self, pubID, sysID):
"""Do a complete resolution lookup of an External Identifier """
ret = libxml2mod.xmlACatalogResolve(self._o, pubID, sysID)
return ret |
Try to lookup the catalog local reference associated to a public ID in that catalog | def resolvePublic(self, pubID):
"""Try to lookup the catalog local reference associated to a
public ID in that catalog """
ret = libxml2mod.xmlACatalogResolvePublic(self._o, pubID)
return ret |
Try to lookup the catalog resource for a system ID | def resolveSystem(self, sysID):
"""Try to lookup the catalog resource for a system ID """
ret = libxml2mod.xmlACatalogResolveSystem(self._o, sysID)
return ret |
Do a complete resolution lookup of an URI | def resolveURI(self, URI):
"""Do a complete resolution lookup of an URI """
ret = libxml2mod.xmlACatalogResolveURI(self._o, URI)
return ret |
Do a copy of the dtd. | def copyDtd(self):
"""Do a copy of the dtd. """
ret = libxml2mod.xmlCopyDtd(self._o)
if ret is None:raise treeError('xmlCopyDtd() failed')
__tmp = xmlDtd(_obj=ret)
return __tmp |
Search the DTD for the description of this attribute on this element. | def dtdAttrDesc(self, elem, name):
"""Search the DTD for the description of this attribute on
this element. """
ret = libxml2mod.xmlGetDtdAttrDesc(self._o, elem, name)
if ret is None:raise treeError('xmlGetDtdAttrDesc() failed')
__tmp = xmlAttribute(_obj=ret)
return __... |
Search the DTD for the description of this element | def dtdElementDesc(self, name):
"""Search the DTD for the description of this element """
ret = libxml2mod.xmlGetDtdElementDesc(self._o, name)
if ret is None:raise treeError('xmlGetDtdElementDesc() failed')
__tmp = xmlElement(_obj=ret)
return __tmp |
Search the DTD for the description of this qualified attribute on this element. | def dtdQAttrDesc(self, elem, name, prefix):
"""Search the DTD for the description of this qualified
attribute on this element. """
ret = libxml2mod.xmlGetDtdQAttrDesc(self._o, elem, name, prefix)
if ret is None:raise treeError('xmlGetDtdQAttrDesc() failed')
__tmp = xmlAttribut... |
Search the DTD for the description of this element | def dtdQElementDesc(self, name, prefix):
"""Search the DTD for the description of this element """
ret = libxml2mod.xmlGetDtdQElementDesc(self._o, name, prefix)
if ret is None:raise treeError('xmlGetDtdQElementDesc() failed')
__tmp = xmlElement(_obj=ret)
return __tmp |
Default handling of defined entities when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point. | def handleEntity(self, ctxt):
"""Default handling of defined entities, when should we define
a new input stream ? When do we just handle that as a set
of chars ? OBSOLETE: to be removed at some point. """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
libxm... |
Save the original error to the new place. | def copyError(self, to):
"""Save the original error to the new place. """
if to is None: to__o = None
else: to__o = to._o
ret = libxml2mod.xmlCopyError(self._o, to__o)
return ret |
Do a copy of the namespace. | def copyNamespace(self):
"""Do a copy of the namespace. """
ret = libxml2mod.xmlCopyNamespace(self._o)
if ret is None:raise treeError('xmlCopyNamespace() failed')
__tmp = xmlNs(_obj=ret)
return __tmp |
Do a copy of an namespace list. | def copyNamespaceList(self):
"""Do a copy of an namespace list. """
ret = libxml2mod.xmlCopyNamespaceList(self._o)
if ret is None:raise treeError('xmlCopyNamespaceList() failed')
__tmp = xmlNs(_obj=ret)
return __tmp |
Creation of a new child element added at the end of | def newChild(self, parent, name, content):
"""Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
... |
Creation of a new node element within a document. | def newDocNode(self, doc, name, content):
"""Creation of a new node element within a document. @ns and
@content are optional (None). NOTE: @content is supposed to
be a piece of XML CDATA, so it allow entities references,
but XML special chars need to be escaped first by using
... |
Creation of a new node element within a document. | def newDocNodeEatName(self, doc, name, content):
"""Creation of a new node element within a document. @ns and
@content are optional (None). NOTE: @content is supposed to
be a piece of XML CDATA, so it allow entities references,
but XML special chars need to be escaped first by usin... |
Creation of a new node element within a document. | def newDocRawNode(self, doc, name, content):
"""Creation of a new node element within a document. @ns and
@content are optional (None). """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlNewDocRawNode(doc__o, self._o, name, content)
if ret is N... |
Creation of a new node element. | def newNodeEatName(self, name):
"""Creation of a new node element. @ns is optional (None). """
ret = libxml2mod.xmlNewNodeEatName(self._o, name)
if ret is None:raise treeError('xmlNewNodeEatName() failed')
__tmp = xmlNode(_obj=ret)
return __tmp |
Create a new property tagged with a namespace and carried by a node. | def newNsProp(self, node, name, value):
"""Create a new property tagged with a namespace and carried
by a node. """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlNewNsProp(node__o, self._o, name, value)
if ret is None:raise treeError('xmlN... |
Create a new property tagged with a namespace and carried by a node. | def newNsPropEatName(self, node, name, value):
"""Create a new property tagged with a namespace and carried
by a node. """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlNewNsPropEatName(node__o, self._o, name, value)
if ret is None:raise t... |
Creation of a new child element added at the end of | def newTextChild(self, parent, name, content):
"""Creation of a new child element, added at the end of
@parent children list. @ns and @content parameters are
optional (None). If @ns is None, the newly created element
inherits the namespace of @parent. If @content is non None,
... |
Associate a namespace to a node a posteriori. | def setNs(self, node):
"""Associate a namespace to a node, a posteriori. """
if node is None: node__o = None
else: node__o = node._o
libxml2mod.xmlSetNs(node__o, self._o) |
Set ( or reset ) an attribute carried by a node. The ns structure must be in scope this is not checked | def setNsProp(self, node, name, value):
"""Set (or reset) an attribute carried by a node. The ns
structure must be in scope, this is not checked """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlSetNsProp(node__o, self._o, name, value)
if ... |
Remove an attribute carried by a node. | def unsetNsProp(self, node, name):
"""Remove an attribute carried by a node. """
if node is None: node__o = None
else: node__o = node._o
ret = libxml2mod.xmlUnsetNsProp(node__o, self._o, name)
return ret |
Dump an HTML document. | def htmlDocContentDumpFormatOutput(self, cur, encoding, format):
"""Dump an HTML document. """
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.htmlDocContentDumpFormatOutput(self._o, cur__o, encoding, format) |
Dump an HTML document. Formating return/ spaces are added. | def htmlDocContentDumpOutput(self, cur, encoding):
"""Dump an HTML document. Formating return/spaces are added. """
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.htmlDocContentDumpOutput(self._o, cur__o, encoding) |
Dump an HTML node recursive behaviour children are printed too. | def htmlNodeDumpFormatOutput(self, doc, cur, encoding, format):
"""Dump an HTML node, recursive behaviour,children are printed
too. """
if doc is None: doc__o = None
else: doc__o = doc._o
if cur is None: cur__o = None
else: cur__o = cur._o
libxml2mod.htmlNodeDu... |
Dump an HTML node recursive behaviour children are printed too and formatting returns/ spaces are added. | def htmlNodeDumpOutput(self, doc, cur, encoding):
"""Dump an HTML node, recursive behaviour,children are printed
too, and formatting returns/spaces are added. """
if doc is None: doc__o = None
else: doc__o = doc._o
if cur is None: cur__o = None
else: cur__o = cur._o
... |
Dump an XML node recursive behaviour children are printed too. Note that | def nodeDumpOutput(self, doc, cur, level, format, encoding):
"""Dump an XML node, recursive behaviour, children are printed
too. Note that @format = 1 provide node indenting only if
xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
called """
if doc is None: doc__o = ... |
Dump an XML document to an I/ O buffer. Warning ! This call xmlOutputBufferClose () on buf which is not available after this call. | def saveFileTo(self, cur, encoding):
"""Dump an XML document to an I/O buffer. Warning ! This call
xmlOutputBufferClose() on buf which is not available after
this call. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlSaveFileTo(self._o, cu... |
Dump an XML document to an I/ O buffer. Warning ! This call xmlOutputBufferClose () on buf which is not available after this call. | def saveFormatFileTo(self, cur, encoding, format):
"""Dump an XML document to an I/O buffer. Warning ! This call
xmlOutputBufferClose() on buf which is not available after
this call. """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlSaveForm... |
Write the content of the array in the output I/ O buffer This routine handle the I18N transcoding from internal UTF - 8 The buffer is lossless i. e. will store in case of partial or delayed writes. | def write(self, len, buf):
"""Write the content of the array in the output I/O buffer
This routine handle the I18N transcoding from internal
UTF-8 The buffer is lossless, i.e. will store in case of
partial or delayed writes. """
ret = libxml2mod.xmlOutputBufferWrite(self._... |
Write the content of the string in the output I/ O buffer This routine handle the I18N transcoding from internal UTF - 8 The buffer is lossless i. e. will store in case of partial or delayed writes. | def writeString(self, str):
"""Write the content of the string in the output I/O buffer
This routine handle the I18N transcoding from internal
UTF-8 The buffer is lossless, i.e. will store in case of
partial or delayed writes. """
ret = libxml2mod.xmlOutputBufferWriteStrin... |
Grow up the content of the input buffer the old data are preserved This routine handle the I18N transcoding to internal UTF - 8 This routine is used when operating the parser in normal ( pull ) mode TODO: one should be able to remove one extra copy by copying directly onto in - > buffer or in - > raw | def grow(self, len):
"""Grow up the content of the input buffer, the old data are
preserved This routine handle the I18N transcoding to
internal UTF-8 This routine is used when operating the
parser in normal (pull) mode TODO: one should be able to
remove one extra copy b... |
Push the content of the arry in the input buffer This routine handle the I18N transcoding to internal UTF - 8 This is used when operating the parser in progressive ( push ) mode. | def push(self, len, buf):
"""Push the content of the arry in the input buffer This
routine handle the I18N transcoding to internal UTF-8 This
is used when operating the parser in progressive (push)
mode. """
ret = libxml2mod.xmlParserInputBufferPush(self._o, len, buf)
... |
Refresh the content of the input buffer the old data are considered consumed This routine handle the I18N transcoding to internal UTF - 8 | def read(self, len):
"""Refresh the content of the input buffer, the old data are
considered consumed This routine handle the I18N
transcoding to internal UTF-8 """
ret = libxml2mod.xmlParserInputBufferRead(self._o, len)
return ret |
Setup an XML reader with new options | def Setup(self, reader, URL, encoding, options):
"""Setup an XML reader with new options """
if reader is None: reader__o = None
else: reader__o = reader._o
ret = libxml2mod.xmlTextReaderSetup(reader__o, self._o, URL, encoding, options)
return ret |
Create an xmlTextReader structure fed with | def newTextReader(self, URI):
"""Create an xmlTextReader structure fed with @input """
ret = libxml2mod.xmlNewTextReader(self._o, URI)
if ret is None:raise treeError('xmlNewTextReader() failed')
__tmp = xmlTextReader(_obj=ret)
__tmp.input = self
return __tmp |
Check if the regular expression generates the value | def regexpExec(self, content):
"""Check if the regular expression generates the value """
ret = libxml2mod.xmlRegexpExec(self._o, content)
return ret |
parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. | def relaxNGParse(self):
"""parse a schema definition resource and build an internal
XML Shema struture which can be used to validate instances. """
ret = libxml2mod.xmlRelaxNGParse(self._o)
if ret is None:raise parserError('xmlRelaxNGParse() failed')
__tmp = relaxNgSchema(_obj... |
Semi private function used to pass informations to a parser context which are a combination of xmlRelaxNGParserFlag. | def relaxParserSetFlag(self, flags):
"""Semi private function used to pass informations to a parser
context which are a combination of xmlRelaxNGParserFlag . """
ret = libxml2mod.xmlRelaxParserSetFlag(self._o, flags)
return ret |
Create an XML RelaxNGs validation context based on the given schema | def relaxNGNewValidCtxt(self):
"""Create an XML RelaxNGs validation context based on the
given schema """
ret = libxml2mod.xmlRelaxNGNewValidCtxt(self._o)
if ret is None:raise treeError('xmlRelaxNGNewValidCtxt() failed')
__tmp = relaxNgValidCtxt(_obj=ret)
__tmp.schema ... |
Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read (). if | def RelaxNGSetSchema(self, reader):
"""Use RelaxNG to validate the document as it is processed.
Activation is only possible before the first Read(). if
@schema is None, then RelaxNG validation is desactivated. @
The @schema should not be freed until the reader is
dealloc... |
Validate a document tree in memory. | def relaxNGValidateDoc(self, doc):
"""Validate a document tree in memory. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlRelaxNGValidateDoc(self._o, doc__o)
return ret |
Validate a full subtree when xmlRelaxNGValidatePushElement () returned 0 and the content of the node has been expanded. | def relaxNGValidateFullElement(self, doc, elem):
"""Validate a full subtree when
xmlRelaxNGValidatePushElement() returned 0 and the content
of the node has been expanded. """
if doc is None: doc__o = None
else: doc__o = doc._o
if elem is None: elem__o = None
... |
Pop the element end from the RelaxNG validation stack. | def relaxNGValidatePopElement(self, doc, elem):
"""Pop the element end from the RelaxNG validation stack. """
if doc is None: doc__o = None
else: doc__o = doc._o
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlRelaxNGValidatePopElement(self._o,... |
check the CData parsed for validation in the current stack | def relaxNGValidatePushCData(self, data, len):
"""check the CData parsed for validation in the current stack """
ret = libxml2mod.xmlRelaxNGValidatePushCData(self._o, data, len)
return ret |
Push a new element start on the RelaxNG validation stack. | def relaxNGValidatePushElement(self, doc, elem):
"""Push a new element start on the RelaxNG validation stack. """
if doc is None: doc__o = None
else: doc__o = doc._o
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlRelaxNGValidatePushElement(sel... |
Use RelaxNG schema context to validate the document as it is processed. Activation is only possible before the first Read (). If | def RelaxNGValidateCtxt(self, reader, options):
"""Use RelaxNG schema context to validate the document as it
is processed. Activation is only possible before the first
Read(). If @ctxt is None, then RelaxNG schema validation is
deactivated. """
if reader is None: reader__o... |
parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. | def schemaParse(self):
"""parse a schema definition resource and build an internal
XML Shema struture which can be used to validate instances. """
ret = libxml2mod.xmlSchemaParse(self._o)
if ret is None:raise parserError('xmlSchemaParse() failed')
__tmp = Schema(_obj=ret)
... |
Use XSD Schema to validate the document as it is processed. Activation is only possible before the first Read (). if | def SetSchema(self, reader):
"""Use XSD Schema to validate the document as it is processed.
Activation is only possible before the first Read(). if
@schema is None, then Schema validation is desactivated. @
The @schema should not be freed until the reader is
deallocated ... |
Create an XML Schemas validation context based on the given schema. | def schemaNewValidCtxt(self):
"""Create an XML Schemas validation context based on the given
schema. """
ret = libxml2mod.xmlSchemaNewValidCtxt(self._o)
if ret is None:raise treeError('xmlSchemaNewValidCtxt() failed')
__tmp = SchemaValidCtxt(_obj=ret)
__tmp.schema = se... |
Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read (). If | def SchemaValidateCtxt(self, reader, options):
"""Use W3C XSD schema context to validate the document as it
is processed. Activation is only possible before the first
Read(). If @ctxt is None, then XML Schema validation is
deactivated. """
if reader is None: reader__o = No... |
Sets the options to be used during the validation. | def schemaSetValidOptions(self, options):
"""Sets the options to be used during the validation. """
ret = libxml2mod.xmlSchemaSetValidOptions(self._o, options)
return ret |
allow access to the parser context of the schema validation context | def schemaValidCtxtGetParserCtxt(self):
"""allow access to the parser context of the schema validation
context """
ret = libxml2mod.xmlSchemaValidCtxtGetParserCtxt(self._o)
if ret is None:raise parserError('xmlSchemaValidCtxtGetParserCtxt() failed')
__tmp = parserCtxt(_obj=ret... |
Validate a document tree in memory. | def schemaValidateDoc(self, doc):
"""Validate a document tree in memory. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlSchemaValidateDoc(self._o, doc__o)
return ret |
Do a schemas validation of the given resource it will use the SAX streamable validation internally. | def schemaValidateFile(self, filename, options):
"""Do a schemas validation of the given resource, it will use
the SAX streamable validation internally. """
ret = libxml2mod.xmlSchemaValidateFile(self._o, filename, options)
return ret |
Validate a branch of a tree starting with the given | def schemaValidateOneElement(self, elem):
"""Validate a branch of a tree, starting with the given @elem. """
if elem is None: elem__o = None
else: elem__o = elem._o
ret = libxml2mod.xmlSchemaValidateOneElement(self._o, elem__o)
return ret |
Hacking interface allowing to get the xmlDocPtr correponding to the current document being accessed by the xmlTextReader. NOTE: as a result of this call the reader will not destroy the associated XML document and calling xmlFreeDoc () on the result is needed once the reader parsing has finished. | def CurrentDoc(self):
"""Hacking interface allowing to get the xmlDocPtr
correponding to the current document being accessed by the
xmlTextReader. NOTE: as a result of this call, the reader
will not destroy the associated XML document and calling
xmlFreeDoc() on the resul... |
Hacking interface allowing to get the xmlNodePtr correponding to the current node being accessed by the xmlTextReader. This is dangerous because the underlying node may be destroyed on the next Reads. | def CurrentNode(self):
"""Hacking interface allowing to get the xmlNodePtr
correponding to the current node being accessed by the
xmlTextReader. This is dangerous because the underlying
node may be destroyed on the next Reads. """
ret = libxml2mod.xmlTextReaderCurrentNode(... |
Reads the contents of the current node and the full subtree. It then makes the subtree available until the next xmlTextReaderRead () call | def Expand(self):
"""Reads the contents of the current node and the full
subtree. It then makes the subtree available until the next
xmlTextReaderRead() call """
ret = libxml2mod.xmlTextReaderExpand(self._o)
if ret is None:raise treeError('xmlTextReaderExpand() failed')
... |
Provides the value of the attribute with the specified qualified name. | def GetAttribute(self, name):
"""Provides the value of the attribute with the specified
qualified name. """
ret = libxml2mod.xmlTextReaderGetAttribute(self._o, name)
return ret |
Provides the value of the attribute with the specified index relative to the containing element. | def GetAttributeNo(self, no):
"""Provides the value of the attribute with the specified
index relative to the containing element. """
ret = libxml2mod.xmlTextReaderGetAttributeNo(self._o, no)
return ret |
Provides the value of the specified attribute | def GetAttributeNs(self, localName, namespaceURI):
"""Provides the value of the specified attribute """
ret = libxml2mod.xmlTextReaderGetAttributeNs(self._o, localName, namespaceURI)
return ret |
Read the parser internal property. | def GetParserProp(self, prop):
"""Read the parser internal property. """
ret = libxml2mod.xmlTextReaderGetParserProp(self._o, prop)
return ret |
Method to get the remainder of the buffered XML. this method stops the parser set its state to End Of File and return the input stream with what is left that the parser did not use. The implementation is not good the parser certainly procgressed past what s left in reader - > input and there is an allocation problem. B... | def GetRemainder(self):
"""Method to get the remainder of the buffered XML. this
method stops the parser, set its state to End Of File and
return the input stream with what is left that the parser
did not use. The implementation is not good, the parser
certainly procgres... |
Resolves a namespace prefix in the scope of the current element. | def LookupNamespace(self, prefix):
"""Resolves a namespace prefix in the scope of the current
element. """
ret = libxml2mod.xmlTextReaderLookupNamespace(self._o, prefix)
return ret |
Moves the position of the current instance to the attribute with the specified qualified name. | def MoveToAttribute(self, name):
"""Moves the position of the current instance to the attribute
with the specified qualified name. """
ret = libxml2mod.xmlTextReaderMoveToAttribute(self._o, name)
return ret |
Moves the position of the current instance to the attribute with the specified index relative to the containing element. | def MoveToAttributeNo(self, no):
"""Moves the position of the current instance to the attribute
with the specified index relative to the containing element. """
ret = libxml2mod.xmlTextReaderMoveToAttributeNo(self._o, no)
return ret |
Moves the position of the current instance to the attribute with the specified local name and namespace URI. | def MoveToAttributeNs(self, localName, namespaceURI):
"""Moves the position of the current instance to the attribute
with the specified local name and namespace URI. """
ret = libxml2mod.xmlTextReaderMoveToAttributeNs(self._o, localName, namespaceURI)
return ret |
Setup an xmltextReader to parse an XML in - memory document. The parsing flags | def NewDoc(self, cur, URL, encoding, options):
"""Setup an xmltextReader to parse an XML in-memory document.
The parsing flags @options are a combination of
xmlParserOption. This reuses the existing @reader
xmlTextReader. """
ret = libxml2mod.xmlReaderNewDoc(self._o, cur, ... |
Setup an xmltextReader to parse an XML from a file descriptor. NOTE that the file descriptor will not be closed when the reader is closed or reset. The parsing flags | def NewFd(self, fd, URL, encoding, options):
"""Setup an xmltextReader to parse an XML from a file
descriptor. NOTE that the file descriptor will not be
closed when the reader is closed or reset. The parsing
flags @options are a combination of xmlParserOption. This
reuse... |
parse an XML file from the filesystem or the network. The parsing flags | def NewFile(self, filename, encoding, options):
"""parse an XML file from the filesystem or the network. The
parsing flags @options are a combination of
xmlParserOption. This reuses the existing @reader
xmlTextReader. """
ret = libxml2mod.xmlReaderNewFile(self._o, filename... |
Setup an xmltextReader to parse an XML in - memory document. The parsing flags | def NewMemory(self, buffer, size, URL, encoding, options):
"""Setup an xmltextReader to parse an XML in-memory document.
The parsing flags @options are a combination of
xmlParserOption. This reuses the existing @reader
xmlTextReader. """
ret = libxml2mod.xmlReaderNewMemory... |
Setup an xmltextReader to parse a preparsed XML document. This reuses the existing | def NewWalker(self, doc):
"""Setup an xmltextReader to parse a preparsed XML document.
This reuses the existing @reader xmlTextReader. """
if doc is None: doc__o = None
else: doc__o = doc._o
ret = libxml2mod.xmlReaderNewWalker(self._o, doc__o)
return ret |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.