Below is the sample code for creation of xml.
var bpsResponseXml = new XElement("BPSResponse");
bpsResponseXml.Add(new XElement("Response",
new XElement("Code", "804"),
new XElement("Text", "TagID value is not genuine")));
var outPutXml = bpsResponseXml.Value;
Current Output xml is shown below, as you can see there are spaces between the characters and words :
<BPSResponse> <Response> <Code>804</Code> <Text>TagID value is not genuine.</Text> </Response> </BPSResponse>
Rather than above xml i want trimmed xml as below :
<BPSResponse><Response><Code>804</Code><Text>TagID value is not genuine.</Text></Response></BPSResponse>
Please help for the same!