You must Sign In to post a response.
  • Category: XML

    How to remove white space in xml page

    i have one xml file that file by default getting some white space from page starting to xml tags.

    like from pagestarting to <xml version="">

    inside the parent to child tag white space i was handle but out side of the space is i cant any one tell me how can i do this....asap.

    Thnak u for your quick responce...
  • #741022
    Hi,

    Use preserveWhitespace "False" for this.

    EXample:

    XmlDocument doc = new XmlDocument();
    doc.preserveWhitespace = false;
    doc.load("foo.xml");
    // doc.InnerXml contains no spaces or returns

    Regards,
    Ritesh


  • Sign In to post your comments