I have a method which returns XML in C#( type: XmlElement). How do I return an Empty XML? Can't use string.Empty obviously.
+3
A:
What do you mean, "empty"? Return null if you want to indicate nothing is being returned.
Otherwise, you'll need to return a minimal document, which consists of an empty element: <element/>
.
John Saunders
2009-12-15 23:02:16
A:
if there is an element like this in xml then while parsing in ie produces object required javascript error.
document.getElementById("city").value = xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue;
which can be stopped by adding if conditions
Jayapal Chandran
2010-04-04 16:56:06