locked
How to generate a xml with linespace by xmlDocument in metro ?

    Question

  • I use xmlDocument API to generate a xml file in metro app:

    XmlDocument^ xmlDocument = ref new XmlDocument;
    
    xmlDocument->AppendChild(xmlDocument->CreateElement("Setting"));
    	
    XmlElement^ verElement=xmlDocument->CreateElement("Ver"); 
    
    verElement->InnerText = "123"
    
    xmlDocument->DocumentElement->AppendChild(verElement);

    This is the result without linespace (\n):

    <Setting><Ver>123</Ver></Setting>

    However, I want the result as bellow:

    <Setting>
    <Ver>123</Ver>
    </Setting>

    How should I do?

    I cannot find any API to set  in XmlDocument in metro mode.

    Thanks for help.




    • Edited by Mandy1205 Thursday, August 16, 2012 2:07 AM
    Wednesday, August 15, 2012 11:49 AM

Answers