Parse XML to dynamic object in C#
<? xml version="1.0" encoding="utf-8" ?> < contacts > < contact id = '1' > < firstName > Michael </ firstName > < lastName > Jordan </ lastName > < age > 40 </ age > < dob > 1965 </ dob > < salary > 100.35 </ salary > </ contact > < contact id = '2' > < firstName > Scottie </ firstName > < lastName > Pippen </ lastName > < age > 38 </ age > < dob > 1967 </ dob > < salary > 55.28 </ salary > </ contact > </ contacts > public class XmlToDynamic { public static void Parse(dynamic parent, XElement node) { if (node.HasElements) { if (node.Elements(node.Elements().First().Name.LocalName).Count() > 1) { //list var item = new ExpandoObject(); var list = new List<dynamic
"Very Nice post..well written..
ReplyDeleteHere i would like to give a plug to my website..which your reader might find intresting...link is as below
.Agile Certification"
Within our large choice of UK free slots to play for fun, there’s a universe of slot themes. Immerse yourself in the historic Egyptian tombs 토토사이트 in Book of Dead, incredible fantasy worlds and smash hit TV shows. If you’re a brand new} crypto casino player, you may get} a 400% welcome bonus of up to as} $4,000. If not, there are additionally different welcome deposit bonuses you could get even when you don’t have crypto. There are plenty of promos and bonuses out there at Wild Casino on-line. For occasion, new players with cryptos like Bitcoin can get a combined welcome bonus of up to as} $9,000 on their first 5 deposits.
ReplyDelete