|
|
|
@ -854,7 +854,7 @@ class _varsXML:
|
|
|
|
|
"""Add var to XML"""
|
|
|
|
|
dictVar = {"indent":self.indent,
|
|
|
|
|
"name":name,
|
|
|
|
|
"value":str(value)}
|
|
|
|
|
"value":self.serialize(value)}
|
|
|
|
|
self.varsXML += self.templateVar %dictVar
|
|
|
|
|
|
|
|
|
|
def addList(self, name, valueList):
|
|
|
|
@ -864,7 +864,7 @@ class _varsXML:
|
|
|
|
|
varXml = self.templateListStart %dictVar
|
|
|
|
|
for value in valueList:
|
|
|
|
|
dictValue = {"indent":self.indent,
|
|
|
|
|
"value":str(value)}
|
|
|
|
|
"value":self.serialize(value)}
|
|
|
|
|
varXml += self.templateListValue %dictValue
|
|
|
|
|
varXml += self.templateListEnd %dictVar
|
|
|
|
|
self.varsXML += varXml
|
|
|
|
@ -877,11 +877,16 @@ class _varsXML:
|
|
|
|
|
for nameDict, valueDict in valueDict.items():
|
|
|
|
|
dictValue = {"indent":self.indent,
|
|
|
|
|
"name":nameDict,
|
|
|
|
|
"value":str(valueDict)}
|
|
|
|
|
"value":self.serialize(valueDict)}
|
|
|
|
|
varXml += self.templateDictValue %dictValue
|
|
|
|
|
varXml += self.templateDictEnd %dictVar
|
|
|
|
|
self.varsXML += varXml
|
|
|
|
|
|
|
|
|
|
def serialize(self, value):
|
|
|
|
|
"""Serialization"""
|
|
|
|
|
return str(value).replace("&","&").replace("<","<").replace(">",
|
|
|
|
|
">")
|
|
|
|
|
|
|
|
|
|
def toXML(self):
|
|
|
|
|
dictXML = {"declaration":self.declaration,
|
|
|
|
|
"rootStart":self.rootElementStart,
|
|
|
|
|