Skip to content

Instantly share code, notes, and snippets.

@ebot
Created November 15, 2011 17:43
Show Gist options
  • Save ebot/1367748 to your computer and use it in GitHub Desktop.
Save ebot/1367748 to your computer and use it in GitHub Desktop.
Convert Soarian Xml Declarations to ZOS Compatible Ones
#!/usr/bin/python
#
# Soarian Conversion Script
# Created By Ed Botzum
#
# This script replaces the UTF xml declaration with an IBM one.
input_file = open( 'soar_1-1-0.xml', 'r' )
input_text = input_file.read()
print input_text.replace( 'utf-8', 'IBM-1047' )
<?xml version='1.0' encoding='utf-8'?>
<Batches BatchId="32056" DocType="T1GOSTB" ReplyUrl="HTTP://omfappp004.resdm50.siemensmedasp.com/NotUsed" UserName="NotUsed" Password="NotUsed" Type='Statements'>
<serialization SerializationRoot="SmsTntBusinessProcessObject" sequenceNum="87743">
<extensions>
<SmsTntXmlSerializerGUIExtension>
<TransactionID ID="{fa814780-e017-457a-976c-774b4bea228b}"/>
<WorkstationID ID="UNKNOWN"/>
</SmsTntXmlSerializerGUIExtension>
</extensions>
</serialization>
</Batches>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment