Improved XmlMarshaller: strings can be dumped as CDATA. Appy objects are marshalled with their history.
This commit is contained in:
parent
c3f5cfc9cd
commit
b888f8149b
2 changed files with 29 additions and 5 deletions
|
@ -295,11 +295,11 @@ class AbstractWrapper:
|
|||
if toDisk and not at:
|
||||
at = getOsTempFolder() + '/' + self.o.UID() + '.xml'
|
||||
# Create the XML version of the object
|
||||
xml = XmlMarshaller().marshall(self.o, objectType='archetype')
|
||||
xml = XmlMarshaller(cdata=True).marshall(self.o, objectType='appy')
|
||||
# Produce the desired result
|
||||
if toDisk:
|
||||
f = file(at, 'w')
|
||||
f.write(xml)
|
||||
f.write(xml.encode('utf-8'))
|
||||
f.close()
|
||||
return at
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue