Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

IXMLDOMDocumentPtr save method is saving the tags in single row.

$
0
0

When i am trying to create a IXMLDOMDocumentPtr and using appendchild populating the domdocument object and finally saving it to the xmlfile the appended rows comes in a single row if we open in notepad.

here is the code snippet:


IXMLDOMElementPtr pXMLDOMElement;
pXMLDOMElement = pXMLDOMNodeRSData->appendChild(pXMLDOMDoc->createElement("z:row"));
pXMLDOMElement->setAttribute("PARAMETERS_KEY", bstrParamKey);
pXMLDOMElement->setAttribute("PARAMETERS_SECTION", paramOrder);
pXMLDOMElement->setAttribute("PARAMETERS_VALUE", paramValue);
pXMLDOMElement->setAttribute("DESCRIPTION", paramDesc);

hr = pXMLDOMDoc->save(tszFilePath);

shown as below:

<z:row PARAMETERS_KEY="ECL_PROFILE_ID" PARAMETERS_SECTION="100" PARAMETERS_VALUE="1" DESCRIPTION="Sucursal CLP"/><z:row PARAMETERS_KEY="ECL_PROFILE_ID" PARAMETERS_SECTION="101" PARAMETERS_VALUE="1" DESCRIPTION="Sucursal USD"/>


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>