Hi,
I am very very new to python and in my application I have to create an XML file.
Please any one help on this issue
Regards,
Naresh
Hi,
I am very very new to python and in my application I have to create an XML file.
Please any one help on this issue
Regards,
Naresh
Well, even though I'm in a bad mood, I'm not going to just give you a link to the file module. Here's how you open, and create an xml file:
xml = """
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
"""
filename = 'file.xml'
f = open(filename, 'w')
f.write(xml)
f.close()
I suggest that you read up on file formats and the python language for simple things like this.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.