I am having a strange problem. I have got this node which has two children from SomeFunction. In the foreach loop it is not doing the second child, if I remove the following statement from the foreach body
then it would do the second child. I do not know why it is breaking out after appending child to SOCHXRoot.
thanks in advance.
SOCHXRoot = createNode("SOCHX");
XmlNode node = SomeFunction();
// node has two children
foreach(XmlNode n in node.ChildNodes)
protected XmlElement createNode(string elementName,string elementValue)
XmlElement node = doc.CreateElement(elementName);
node.InnerText = elementValue;