Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
xml.etree.ElementTree.QName Class Reference

QName wrapper. More...

List of all members.

Public Member Functions

def __init__
def __str__
def __repr__
def __hash__
def __le__
def __lt__
def __ge__
def __gt__
def __eq__
def __ne__

Public Attributes

 text

Detailed Description

QName wrapper.

This can be used to wrap a QName attribute value, in order to get proper namespace handling on output.

Parameters:
textA string containing the QName value, in the form {uri}local, or, if the tag argument is given, the URI part of a QName.
tagOptional tag. If given, the first argument is interpreted as an URI, and this argument is interpreted as a local name.
Returns:
An opaque object, representing the QName.

Definition at line 580 of file ElementTree.py.


Constructor & Destructor Documentation

def xml.etree.ElementTree.QName.__init__ (   self,
  text_or_uri,
  tag = None 
)

Definition at line 581 of file ElementTree.py.

00581 
00582     def __init__(self, text_or_uri, tag=None):
00583         if tag:
00584             text_or_uri = "{%s}%s" % (text_or_uri, tag)
        self.text = text_or_uri

Here is the caller graph for this function:


Member Function Documentation

def xml.etree.ElementTree.QName.__eq__ (   self,
  other 
)

Definition at line 607 of file ElementTree.py.

00607 
00608     def __eq__(self, other):
00609         if isinstance(other, QName):
00610             return self.text == other.text
        return self.text == other
def xml.etree.ElementTree.QName.__ge__ (   self,
  other 
)

Definition at line 599 of file ElementTree.py.

00599 
00600     def __ge__(self, other):
00601         if isinstance(other, QName):
00602             return self.text >= other.text
        return self.text >= other
def xml.etree.ElementTree.QName.__gt__ (   self,
  other 
)

Definition at line 603 of file ElementTree.py.

00603 
00604     def __gt__(self, other):
00605         if isinstance(other, QName):
00606             return self.text > other.text
        return self.text > other

Definition at line 589 of file ElementTree.py.

00589 
00590     def __hash__(self):
        return hash(self.text)
def xml.etree.ElementTree.QName.__le__ (   self,
  other 
)

Definition at line 591 of file ElementTree.py.

00591 
00592     def __le__(self, other):
00593         if isinstance(other, QName):
00594             return self.text <= other.text
        return self.text <= other
def xml.etree.ElementTree.QName.__lt__ (   self,
  other 
)

Definition at line 595 of file ElementTree.py.

00595 
00596     def __lt__(self, other):
00597         if isinstance(other, QName):
00598             return self.text < other.text
        return self.text < other
def xml.etree.ElementTree.QName.__ne__ (   self,
  other 
)

Definition at line 611 of file ElementTree.py.

00611 
00612     def __ne__(self, other):
00613         if isinstance(other, QName):
00614             return self.text != other.text
00615         return self.text != other
00616 
00617 # --------------------------------------------------------------------

Definition at line 587 of file ElementTree.py.

00587 
00588     def __repr__(self):
        return '<QName %r>' % (self.text,)

Definition at line 585 of file ElementTree.py.

00585 
00586     def __str__(self):
        return self.text

Member Data Documentation

Definition at line 584 of file ElementTree.py.


The documentation for this class was generated from the following file: