'@param qname: Tuple of (uri, name)
@param defaultUri: The default URI of the element; defaults to the URI
specified in C{qname}
@param attribs: Dictionary of attributes
@param localPrefixes: Dictionary of namespace declarations on this
element. The key is the prefix to bind the
namespace uri to.'

def __init__(self, qname, defaultUri=None, attribs=None, localPrefixes=None):

    self.localPrefixes = (localPrefixes or {})
    (self.uri, self.name) = qname
    if ((defaultUri is None) and (self.uri not in itervalues(self.localPrefixes))):
        self.defaultUri = self.uri
    else:
        self.defaultUri = defaultUri
    self.attributes = (attribs or {})
    self.children = []
    self.parent = None
