Last post Dec 09, 2011 12:41 AM by testmvc
Nov 25, 2011 02:02 AM|testmvc|LINK
the xml that gets generated is in the form
<param dfdfdfd />
Because of this the xslt doesnt recognise the end tag and throws an error for the param tag.
I m reading the xml using
using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse())
using (Stream receiveStream = webResponse.GetResponseStream())
using (StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8))
string xmlValue = readStream.ReadToEnd();
XDocument resultsDocument = new XDocument.parse(xmlValue);
Is there a way to explicitly close all tags that are currently self closed
Nov 26, 2011 08:09 PM|decker dong - msft|LINK
As far as I see, the problem doesn't belong to your codes at present, but I'm afraid it belongs to your xml formation. You should notice the problem during the period when you are creating the xml contents. You can use XmlTextWriter to create an FullTagEkle,
MSDN's sample is this:
public class Sample
public static void Main()
//Create a writer to write XML to the console.
XmlTextWriter writer = null;
writer = new XmlTextWriter (Console.Out);
//Use indentation for readability.
writer.Formatting = Formatting.Indented;
//Write an element (this one is the root).
//Write some attributes.
//Write a full end element. Because this element has no
//content, calling WriteEndElement would have written a
//short end tag '/>'.
//Write the XML to file and close the writer
Dec 09, 2011 12:41 AM|testmvc|LINK
Using XmlTextWriter is not an option as the results are returned from a service. We can only change the format of the results returned.
I found the solution to the problem. The problem was in the xslt that we were using for transformation.