Insert line in xml doc
Posted
by phenevo
on Stack Overflow
See other posts from Stack Overflow
or by phenevo
Published on 2010-05-11T10:22:00Z
Indexed on
2010/05/11
10:34 UTC
Read the original article
Hit count: 180
Hi, I wanna insert in second line :
<?mso-application progid="Excel.Sheet"?>
but I'm started to think that it is impossible.
Here is my base code:
XmlDocument doc = new XmlDocument();
XmlReader reader = cmd.ExecuteXmlReader();
doc.LoadXml("<results></results>");
XmlNode newNode = doc.ReadNode(reader);
while (newNode != null)
{
doc.DocumentElement.AppendChild(newNode);
newNode = doc.ReadNode(reader);
}
© Stack Overflow or respective owner