My goal is to build an xml template with placeholders for variable attributes. for some reasons, the template would not take in new data into its placeholders.
Here's an example:
x=2*5
xmlTemplate="""
<personal reference="500.txt">
<others:sequence>
<feature:name="name" age="age" dob="dob"/>
</others:sequence>
</personal>""".format(name='Michael', age=x, dob=15/10/1900)
print xmlTemplate
Output:
<personal reference="500.txt">
<others:sequence>
<feature:name="name" age="age" dob="dob"/>
</others:sequence>
</personal>
Ideal output:
<personal reference="500.txt">
<others:sequence>
<feature:name="Michael" age="10" dob="15/10/1900"/>
</others:sequence>
</personal>
Any ideas? Thanks.