[xml] xmlSaveFormatFile indentation problem



I compiled my xml program (using libxml2) on Redhat
Linux 8.x. An XML file is created using
xmlSaveFormatFile ("file.xml", doc, 1). The
indentation looks fine on Linux 8.x server. However
when I run the same program on Redhat 7.3, the xml
file created does not have any indentation, it looks
like this:
<?xml version="1.0"?>
<myinfo>
<server1>myservername</server1>
<server2>mysecondsever</server2>
< .....
< .....
</myinfo>

On Redhat Linux 8.x, it looks like this
<?xml version="1.0"?>
<myinfo>
  <server1>myservername</server1>
  <server2>mysecondsever</server2>
  < .....
  < .....
</myinfo>

I suspect the libxml2 read the indentation setting
from an linux environmnet variable. Any idea how to
generate an xml file with identation on Linux 7.3?

Another question:
I have done some searches on this list and I found no
solution on this issue:
How to insert "<!DOCTYPE test SYSTEM "test.dtd">"
statement on an xml file using libxml2 library? 

Thanks

 


 

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com



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