|
Package gnue ::
Package common ::
Package definitions ::
Module GParser ::
Class xmlHandler
|
|
Class xmlHandler
ContentHandler --+
|
xmlHandler
- Known Subclasses:
-
xmlReportHandler
This class is used by the XML parser to process the XML file.
| Method Summary |
| |
__init__(self)
|
| |
_object_created_(self,
obj)
|
| |
characters(self,
content)
Called by the internal SAX parser whenever text (not part of a tag) is
encountered. |
| |
comment(self,
text)
|
| |
endCDATA(self)
|
| |
endDTD(self)
|
| |
endElementNS(self,
name,
qname)
Called by the internal SAX parser whenever an ending XML tag/element
is encountered. |
| |
endEntity(self,
name)
|
| |
finalValidation(self)
Perform a final validation of the tags. |
| |
getRoot(self)
Return the root node of the object tree |
| |
getRootComments(self)
Return sequence of comment tags given before the root node |
| |
initValidation(self)
Update some statistics about the elements in use. |
| |
startCDATA(self)
|
| |
startDTD(self,
name,
public_id,
system_id)
|
| |
startElementNS(self,
name,
qname,
attrs)
Signals the start of an element in namespace mode. |
| |
startEntity(self,
name)
|
_object_created_(self,
obj)
-
|
finalValidation(self)
Perform a final validation of the tags. Checks if all required tags
are really defined (via tag-counter dictionary).
-
|
getRoot(self)
-
- Returns:
-
the root node of the object tree
|
getRootComments(self)
-
- Returns:
-
sequence of comment tags given before the root node
|
initValidation(self)
Update some statistics about the elements in use. All 'required'
elements will be added to the sequence _requiredTags and all elements
having a True value set for 'SingleInstance' will be added to the
sequence _singleInstanceTags. Additionally the tag-counter dictionary
will be reset.
-
|
startDTD(self,
name,
public_id,
system_id)
-
|
startElementNS(self,
name,
qname,
attrs)
Signals the start of an element in namespace mode.
The name parameter contains the name of the element type as a (uri,
localname) tuple, the qname parameter the raw XML 1.0 name used in the
source document, and the attrs parameter holds an instance of the
Attributes class containing the attributes of the element.
The uri part of the name tuple is None for elements which have no
namespace.
-
- Overrides:
_xmlplus.sax.handler.ContentHandler.startElementNS
|
default_namespace
The default namespace (which would be dropped), i.e. if the default
namespace is 'Foo', then <Foo:test> would just be processed as
<test>.
-
- Type:
-
NoneType
- Value:
|
ignore_unknown_namespaces
If set to True, any elements that have an unknown namespace will be
dropped.
-
- Type:
-
bool
- Value:
|
xmlElements
-
- Type:
-
dict
- Value:
|
xmlMasqueradeNamespaceElements
-
- Type:
-
NoneType
- Value:
|
xmlNamespaceAttributesAsPrefixes
-
- Type:
-
bool
- Value:
|