コード例 #1
0
	def from_xml(self, elem):
		self._init_by_name()
		for c in elem:
			tag=bbxml.remove_ns(c.tag)
			if self._by_name.has_key(tag):
					obj=self.__dict__[self._by_name[tag]]
					obj.from_xml(c)
コード例 #2
0
	def create_from_xml(self, elem):
		module=int_from_bb(elem.attrib['module'])
		id=int_from_bb(elem.attrib['id'])
		name=bbxml.remove_ns(elem.tag)
		obj=self.create( [module, id], name )
		obj.from_xml(elem)
		return obj