コード例 #1
0
	def addXML(self, depth, output):
		"Add xml for this object."
		if self.className == 'comment':
			output.write( self.text )
			return
		innerOutput = cStringIO.StringIO()
		xml_simple_writer.addXMLFromObjects( depth + 1, self.children, innerOutput )
		innerText = innerOutput.getvalue()
		xml_simple_writer.addBeginEndInnerXMLTag( self.attributeDictionary, self.className, depth, innerText, output, self.text )
コード例 #2
0
 def addXML(self, depth, output):
     'Add xml for this elementNode.'
     innerOutput = cStringIO.StringIO()
     xml_simple_writer.addXMLFromObjects(depth + 1, self.childNodes,
                                         innerOutput)
     innerText = innerOutput.getvalue()
     xml_simple_writer.addBeginEndInnerXMLTag(self.attributes, depth,
                                              innerText, self.localName,
                                              output, self.getTextContent())
コード例 #3
0
 def addXML(self, depth, output):
     'Add xml for this xmlElement.'
     if self.localName == 'comment':
         output.write( self.text )
         return
     innerOutput = StringIO.StringIO()
     xml_simple_writer.addXMLFromObjects(depth + 1, self.childNodes, innerOutput)
     innerText = innerOutput.getvalue()
     xml_simple_writer.addBeginEndInnerXMLTag(self.attributeDictionary, depth, innerText, self.localName, output, self.text)
コード例 #4
0
ファイル: dictionary.py プロジェクト: folksjos/RepG
	def addXML(self, depth, output):
		"Add xml for this object."
		attributeCopy = {}
		if self.xmlElement != None:
			attributeCopy = evaluate.getEvaluatedDictionary( [], self.xmlElement )
		euclidean.removeListFromDictionary( attributeCopy, matrix.getMatrixKeys() )
		euclidean.removeTrueFromDictionary( attributeCopy, 'visible')
		innerOutput = cStringIO.StringIO()
		self.addXMLInnerSection( depth + 1, innerOutput )
		self.addXMLArchivableObjects( depth + 1, innerOutput )
		xml_simple_writer.addBeginEndInnerXMLTag( attributeCopy, self.getXMLClassName(), depth, innerOutput.getvalue(), output )
コード例 #5
0
ファイル: dictionary.py プロジェクト: CNCBASHER/skeinforge-1
	def addXML(self, depth, output):
		'Add xml for this object.'
		attributeCopy = {}
		if self.xmlElement != None:
			attributeCopy = evaluate.getEvaluatedDictionaryByCopyKeys(['paths', 'target', 'vertexes'], self.xmlElement)
		euclidean.removeElementsFromDictionary(attributeCopy, matrix.getKeysM())
		euclidean.removeTrueFromDictionary(attributeCopy, 'visible')
		innerOutput = cStringIO.StringIO()
		self.addXMLInnerSection(depth + 1, innerOutput)
		self.addXMLArchivableObjects(depth + 1, innerOutput)
		xml_simple_writer.addBeginEndInnerXMLTag(attributeCopy, self.getXMLClassName(), depth, innerOutput.getvalue(), output)