Example #1
0
	def addXML( self, depth, output ):
		"Add xml for this object."
		attributeDictionaryCopy = {}
		if self.xmlElement != None:
			attributeDictionaryCopy = evaluate.getEvaluatedDictionary( [], self.xmlElement )
		euclidean.removeListFromDictionary( attributeDictionaryCopy, matrix4x4.getMatrixKeys() )
		euclidean.removeTrueFromDictionary( attributeDictionaryCopy, 'visible' )
		innerOutput = cStringIO.StringIO()
		self.addXMLInnerSection( depth + 1, innerOutput )
		self.addXMLArchivableObjects( depth + 1, innerOutput )
		if len( innerOutput.getvalue() ) > 0:
			xml_simple_writer.addBeginXMLTag( attributeDictionaryCopy, depth, self.getXMLClassName(), output )
			output.write( innerOutput.getvalue() )
			xml_simple_writer.addEndXMLTag( depth, self.getXMLClassName(), output )
		else:
			xml_simple_writer.addClosedXMLTag( attributeDictionaryCopy, depth, self.getXMLClassName(), output )
	def addXML( self, depth, output ):
		"Add xml for this object."
		xml_simple_writer.addBeginXMLTag( self.attributeDictionary, depth, self.className, output )
		xml_simple_writer.addXMLFromObjects( depth + 1, self.children, output )
		xml_simple_writer.addEndXMLTag( depth, self.className, output )