how to store array value to Xml

Posted by Sabarimahesh under C# on 4/16/2012 | Points: 10 | Views : 4415 | Status : [Member] | Replies : 4
how to store array value to Xml???????????


Any idea!!!!!!!!!

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M



Responses

Posted by: Prabhakar on: 4/16/2012 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi, Sabarimahesh


go with this link it's help us u . ..

http://www.dotnetperls.com/xmlwriter

Best Regard's
Prabhakar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/16/2012 [Member] Bronze | Points: 25

Up
0
Down
No Prabhakar


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/16/2012 [Member] Bronze | Points: 25

Up
0
Down
Ex:

ArrayList arr = gr_inp(id;
////Now arr having list of arrys...

XmlDocument gr= new XmlDocument();
.LoadXml()// here i want to load arr to xml
getLogicDetails_Forloop.Save("~pathl");

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Swapnil on: 4/16/2012 [Member] Starter | Points: 25

Up
0
Down
Here you go...
ArrayList arr = gr_inp(id;

////Now arr having list of arrys...

XmlDocument gr= new XmlDocument();
.LoadXml(ArrayToXML(arr, "Parameters", "param")) // here i want to load arr to xml
getLogicDetails_Forloop.Save("~pathl");


public string ArrayToXML(Object[] params, string rootNamespace, string elementName)
{
string xmlString = "<" + rootNamespace + ">";
foreach (Object param in params)
{
xmlStr += "<" + elementName + ">" + param.ToString() +
"</" + elementName + ">";
}
xmlStr += "</" + rootNamespace + ">";
return xmlString;
}


Thanks and Regards,
Swapnil

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response