/ Published in: C#
Expand |
Embed | Plain Text
static void Csharp_HelloWorld_XML() { XmlNode myRoot; XmlAttribute myAttribute; myRoot = doc.CreateElement("HelloXMLWorld"); myRoot.InnerText = "ROOT Element"; doc.AppendChild(myRoot); myAttribute = doc.CreateAttribute("Attribute1"); myAttribute.InnerText = "AttributeText1"; myRoot.Attributes.Append(myAttribute); //doc.Save(@"c:\helloxmlworld.xml"); Console.WriteLine(doc.OuterXml); XmlNode connSntringNode = root.SelectNodes(@"//ConnectionString")[0]; }
Comments
Subscribe to comments
You need to login to post a comment.

this code is very help ful to me thankyou
error:Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
In sql server 2005 sp executing in 45 sec.
reference add: Microsoft.ApplicationBlocks.Data.dll code behind: i have use sqlhelper class
SqlHelper.ExecuteReader(ConnectionString, DatabaseOwner & ObjectQualifier & “GetCostSummaryByDate”, PickupFromDate, PickupToDate, CompanyNo, SystemNo, AccountNo, Reference, sort)
i have not use sqlcommand
pls reply me solution as soon as possible..
Regards, ANKIT CHAMPANERIYA