TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
venkat
NA
138
51.7k
convert List<List<>> to XML in c#
Aug 3 2018 6:18 AM
Hi All,
I have List of List and need to convert as xmlelement please any one help.
I have Tried like this. Below is my code.
insertDetails.BulkrefTableList is the List of List data. (i mean. List<List<Classname>> )
foreach (var RefData in insertDetails.BulkrefTableList)
{
XDocument RefDataDetails = new XDocument(new XDeclaration("1.0", "UTF - 8", "yes"),
new XElement(insertDetails.TableName,
from RefDetails in RefData
select new XElement(insertDetails.TableName,
new XElement("ColumnNames", RefDetails.ColumnNames),
new XElement("ColumnValues", RefDetails.ColumnValues),
new XElement("IsPrimary", RefDetails.IsPrimary.ToString()))));
}
Reply
Answers (
4
)
cannot implicitly convert model to viewmodel error
Calling the Java script function from Page_unload event