[xml] messy xmlTextChild output format



Hi,
 
I am working on Windows BorlandC++ and Solaris Forte. And I am trying to generate a xml file by DOM API.
 
This is a snippet of my code:
 
    pXmlTableNode = xmlNewChild(  pXmlRootNode, NULL, "Table", NULL );
    pXmlAttr = xmlSetProp( pXmlTableNode, "TblName", "cmClients" );
 
    pXmlNode = xmlNewTextChild(  pXmlTableNode, NULL, "clientId", "12" );
    pXmlNode = xmlNewChild(  pXmlTableNode, NULL, "providerNumber", "262162" );
    xmlSaveFormatFile( "test.xml",  pXmlDoc, 4);
and the following is the part of xml file which is generated from this codes.
 
  <Table TblName="cmClients">
    <clientId>
12
    </clientId>
    <providerNumber>
262162
    </providerNumber>
  </Table>

 
And I use the same code to run on UNIX(Solaris), the xml file is more beautiful which is just what I want:
 
  <Table TblName="cmClients">
    <clientId>12</clientId>
    <providerNumber>262162</providerNumber>
  </Table>
So I think I must have missed some kind of setting on Windows, what is it, how to set??
 
Thank you very much in advance
 
Pan


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