[xml] Question about saving XML files



hello,

(Does one need to be subscribed to the list to post ? It doesn't say on the main page, but it didn't work when I tried ... so I am resending this after subscribing)

I looked in the archive but couldn't find anything on this issue:

I have a taxes application that used to use libxml 2.0. I upgraded to libxml2 (2.4) and changed the various config/make file to use -lxml2.

I haven't changed anything in the source code, but now the xml file being saved has everything on one line (after the xml version tag). I assume this is caused by the upgrade, but I'm not sure.

It used to look like this:

<?xml version="1.0"?>
<TAX_RETURN>
<VERSION>
0.2
</VERSION>
......(lots of stuff here)...
</TAX_RETURN>


Now it is saved as:
<?xml version="1.0"?>
<TAX_RETURN><VERSION>0.2</VERSION>......(lots of stuff here)...</TAX_RETURN>


That makes it a lot harder to read by a human, although my program can read back both format just fine.

I tried xmlSaveFile and xmlDocDump with the same result.

How do I make my program output the "/n" so it's easier to read by a person ?

Thanks you for your time.


Chris.








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]