+ def setXMLAttributes(self, xmlName, attrs=None, children=None, nsMap=None, defaultNS=None):
+ if xmlName != None:
+ i = xmlName.rfind(':')
+ if i < 0:
+ self.__xmlname__ = xmlName
+ if defaultNS != None:
+ self.__xmldefaultnamespace__ = str(defaultNS)
+ else:
+ self.__xmlname__ = xmlName[i+1:]
+ prefix = xmlName[:i]
+ if nsMap.has_key(prefix):
+ self.__xmldefaultnamespace__ = str(nsMap[prefix])
+ if attrs != None:
+ for attrname, attr in attrs.items():
+ attrname = str(attrname)
+ if attrname == XMLNS or attrname.startswith(XMLNS_PREFIX):
+ pass
+ elif attrname == "objtype":
+ pass
+ else:
+ if not hasattr(self, '__xmlattributes__'):
+ self.__xmlattributes__ = []
+ i = attrname.rfind(':')
+ if i >= 0:
+ prefix = attrname[:i]
+ attrname = attrname[i+1:]
+ if not hasattr(self, '__xmlattrnamespaces__'):
+ self.__xmlattrnamespaces__ = {}
+ if self.__xmlattrnamespaces__.has_key(prefix):
+ alist = self.__xmlattrnamespaces__[prefix]
+ else:
+ alist = []
+ alist.append(attrname)
+ self.__xmlattrnamespaces__[prefix] = alist
+ self.__xmlattributes__.append(attrname)
+ if hasattr(self, '__xmlattributes__'):
+ self.__xmlattributes__.sort()
+ if children != None and len(children) > 0:
+ childList = []
+ flattenList = {}
+ for childname, child in children:
+ childstr = str(childname)
+ if childstr in childList:
+ if not flattenList.has_key(childstr):
+ flattenList[childstr] = (childstr,)
+ else:
+ childList.append(childstr)
+ if len(flattenList) > 0:
+ self.__xmlflattensequence__ = flattenList
+
+ def initialize(self, arg1=None):
+ pass
+
+