whitespace in xml output

W

wadi wadi

Hi all,

I am creating some xml output using minidom and saving it to a file using
doc.writexml()
The output however is as follows:

<?xml version="1.0" ?>
<info>
<Author>
bill catman
</Author>
</info>


Is there a way to save xml output in a file such as xml is formatted the
right way? I mean with the right indentation and the elements values with no
white spaces?

<?xml version="1.0" ?>
<info>
<Author>bill catman</Author>
</info>


Thanks for your help.
WN
 
L

Lutz Horn

Hi,

wadi wadi said:
I am creating some xml output using minidom and saving it to a file
using doc.writexml()

Could you please add some code of *how* you add the content "bill
catman" to the "Author" element? It seems as if whitespace is an issue
here.

Lutz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top