Module libxml2 :: Class xmlTextReader
[hide private]
[frames] | no frames]

Class xmlTextReader

source code

xmlTextReaderCore --+
                    |
                   xmlTextReader

Instance Methods [hide private]
 
__init__(self, _obj=None) source code
 
__del__(self) source code
 
AttributeCount(self)
Provides the number of attributes of the current node
source code
 
BaseUri(self)
The base URI of the node.
source code
 
ByteConsumed(self)
This function provides the current index of the parser used by the reader, relative to the start of the current entity.
source code
 
Close(self)
This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.
source code
 
CurrentDoc(self)
Hacking interface allowing to get the xmlDocPtr correponding to the current document being accessed by the xmlTextReader.
source code
 
CurrentNode(self)
Hacking interface allowing to get the xmlNodePtr correponding to the current node being accessed by the xmlTextReader.
source code
 
Depth(self)
The depth of the node in the tree.
source code
 
Encoding(self)
Determine the encoding of the document being read.
source code
 
Expand(self)
Reads the contents of the current node and the full subtree.
source code
 
GetAttribute(self, name)
Provides the value of the attribute with the specified qualified name.
source code
 
GetAttributeNo(self, no)
Provides the value of the attribute with the specified index relative to the containing element.
source code
 
GetAttributeNs(self, localName, namespaceURI)
Provides the value of the specified attribute
source code
 
GetParserColumnNumber(self)
Provide the column number of the current parsing point.
source code
 
GetParserLineNumber(self)
Provide the line number of the current parsing point.
source code
 
GetParserProp(self, prop)
Read the parser internal property.
source code
 
GetRemainder(self)
Method to get the remainder of the buffered XML.
source code
 
HasAttributes(self)
Whether the node has attributes.
source code
 
HasValue(self)
Whether the node can have a text value.
source code
 
IsDefault(self)
Whether an Attribute node was generated from the default value defined in the DTD or schema.
source code
 
IsEmptyElement(self)
Check if the current node is empty
source code
 
IsNamespaceDecl(self)
Determine whether the current node is a namespace declaration rather than a regular attribute.
source code
 
IsValid(self)
Retrieve the validity status from the parser context
source code
 
LocalName(self)
The local name of the node.
source code
 
LookupNamespace(self, prefix)
Resolves a namespace prefix in the scope of the current element.
source code
 
MoveToAttribute(self, name)
Moves the position of the current instance to the attribute with the specified qualified name.
source code
 
MoveToAttributeNo(self, no)
Moves the position of the current instance to the attribute with the specified index relative to the containing element.
source code
 
MoveToAttributeNs(self, localName, namespaceURI)
Moves the position of the current instance to the attribute with the specified local name and namespace URI.
source code
 
MoveToElement(self)
Moves the position of the current instance to the node that contains the current Attribute node.
source code
 
MoveToFirstAttribute(self)
Moves the position of the current instance to the first attribute associated with the current node.
source code
 
MoveToNextAttribute(self)
Moves the position of the current instance to the next attribute associated with the current node.
source code
 
Name(self)
The qualified name of the node, equal to Prefix :LocalName.
source code
 
NamespaceUri(self)
The URI defining the namespace associated with the node.
source code
 
NewDoc(self, cur, URL, encoding, options)
Setup an xmltextReader to parse an XML in-memory document.
source code
 
NewFd(self, fd, URL, encoding, options)
Setup an xmltextReader to parse an XML from a file descriptor.
source code
 
NewFile(self, filename, encoding, options)
parse an XML file from the filesystem or the network.
source code
 
NewMemory(self, buffer, size, URL, encoding, options)
Setup an xmltextReader to parse an XML in-memory document.
source code
 
NewWalker(self, doc)
Setup an xmltextReader to parse a preparsed XML document.
source code
 
Next(self)
Skip to the node following the current one in document order while avoiding the subtree if any.
source code
 
NextSibling(self)
Skip to the node following the current one in document order while avoiding the subtree if any.
source code
 
NodeType(self)
Get the node type of the current node Reference: http://dotgnu.org/pnetlib-doc/System/Xml/XmlNodeType.html
source code
 
Normalization(self)
The value indicating whether to normalize white space and attribute values.
source code
 
Prefix(self)
A shorthand reference to the namespace associated with the node.
source code
 
Preserve(self)
This tells the XML Reader to preserve the current node.
source code
 
QuoteChar(self)
The quotation mark character used to enclose the value of an attribute.
source code
 
Read(self)
Moves the position of the current instance to the next node in the stream, exposing its properties.
source code
 
ReadAttributeValue(self)
Parses an attribute value into one or more Text and EntityReference nodes.
source code
 
ReadInnerXml(self)
Reads the contents of the current node, including child nodes and markup.
source code
 
ReadOuterXml(self)
Reads the contents of the current node, including child nodes and markup.
source code
 
ReadState(self)
Gets the read state of the reader.
source code
 
ReadString(self)
Reads the contents of an element or a text node as a string.
source code
 
RelaxNGSetSchema(self, schema)
Use RelaxNG to validate the document as it is processed.
source code
 
RelaxNGValidate(self, rng)
Use RelaxNG to validate the document as it is processed.
source code
 
SchemaValidate(self, xsd)
Use W3C XSD schema to validate the document as it is processed.
source code
 
SchemaValidateCtxt(self, ctxt, options)
Use W3C XSD schema context to validate the document as it is processed.
source code
 
SetParserProp(self, prop, value)
Change the parser processing behaviour by changing some of its internal properties.
source code
 
SetSchema(self, schema)
Use XSD Schema to validate the document as it is processed.
source code
 
Setup(self, input, URL, encoding, options)
Setup an XML reader with new options
source code
 
Standalone(self)
Determine the standalone status of the document being read.
source code
 
String(self, str)
Get an interned string from the reader, allows for example to speedup string name comparisons
source code
 
Value(self)
Provides the text value of the node if present
source code
 
XmlLang(self)
The xml:lang scope within which the node resides.
source code
 
XmlVersion(self)
Determine the XML version of the document being read.
source code

Inherited from xmlTextReaderCore: GetErrorHandler, SetErrorHandler

Method Details [hide private]

__init__(self, _obj=None)
(Constructor)

source code 
Overrides: xmlTextReaderCore.__init__

__del__(self)
(Destructor)

source code 
Overrides: xmlTextReaderCore.__del__

ByteConsumed(self)

source code 
This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.

CurrentDoc(self)

source code 
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.

CurrentNode(self)

source code 
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.

Expand(self)

source code 
Reads the contents of the current node and the full subtree. It then makes the subtree available until the next xmlTextReaderRead() call

GetRemainder(self)

source code 
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. Best would be to rewrite it differently.

NewDoc(self, cur, URL, encoding, options)

source code 
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.

NewFd(self, fd, URL, encoding, options)

source code 
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 reuses the existing @reader xmlTextReader.

NewFile(self, filename, encoding, options)

source code 
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.

NewMemory(self, buffer, size, URL, encoding, options)

source code 
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.

NewWalker(self, doc)

source code 
Setup an xmltextReader to parse a preparsed XML document. This reuses the existing @reader xmlTextReader.

NextSibling(self)

source code 
Skip to the node following the current one in document order while avoiding the subtree if any. Currently implemented only for Readers built on a document

Normalization(self)

source code 
The value indicating whether to normalize white space and attribute values. Since attribute value and end of line normalizations are a MUST in the XML specification only the value true is accepted. The broken bahaviour of accepting out of range character entities like � is of course not supported either.

Preserve(self)

source code 
This tells the XML Reader to preserve the current node. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished

RelaxNGSetSchema(self, schema)

source code 
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 deallocated or its use has been deactivated.

RelaxNGValidate(self, rng)

source code 
Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @rng is None, then RelaxNG validation is deactivated.

SchemaValidate(self, xsd)

source code 
Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is None, then XML Schema validation is deactivated.

SchemaValidateCtxt(self, ctxt, options)

source code 
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.

SetParserProp(self, prop, value)

source code 
Change the parser processing behaviour by changing some of its internal properties. Note that some properties can only be changed before any read has been done.

SetSchema(self, schema)

source code 
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 or its use has been deactivated.