Revision: 62730
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 8, 2013 02:33 by dego89
Initial Code
XmlNodeList floorplans = xmlDoc.SelectNodes("/Property/Floorplans/Floorplan"); numberOfRooms = floorplans.Count; DataTable dtRooms = new DataTable(); dtRooms.Columns.Add("roomType"); dtRooms.Columns.Add("Level"); dtRooms.Columns.Add("Dimensions"); for (int i = 0; i < floorplans.Count; i++) { try { XmlNode roomNode = floorplans.Item(i); string roomType = floorplans[i].Attributes["UnitType"].InnerText; string level = floorplans[i].Attributes["Level"].InnerText; string Dimensions = floorplans[i].InnerText; dtRooms.Rows.Add(roomType, level, Dimensions); } catch (NullReferenceException e) { roomError.Text = e.Message; } } repeaterRooms.DataSource = dtRooms; repeaterRooms.DataBind();
Initial URL
Initial Description
Ektron smartform data contains a xml nodelist which I put in a data table and parse out into an html table
Initial Title
XMLNodeList to HTML Table based on Ektron Smartform data
Initial Tags
list, xml, api
Initial Language
C#