XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(strXml);
xmlReader = new XmlNodeReader(xmlDoc);
<table cellpadding="3" cellspacing="0" border="0" width="98%" class="border">
<tr class="hrow">
<th>
Name</th>
<th>
Value</th>
</tr>
<%while (xmlReader.Read())
{ %>
<tr style="background-color: #E0E6F8; font-weight: bold;">
<td colspan="2">
<%=xmlReader.Name%>
</td>
</tr>
<%if (xmlReader.HasAttributes)
{ %>
<% while (xmlReader.MoveToNextAttribute())
{%>
<tr>
<td>
<%=xmlReader.Name%>
</td>
<td>
<%=xmlReader.Value%>
</td>
</tr>
<%} %>
<% xmlReader.MoveToElement(); %>
<%} %>
<%} %>
</table>
No comments:
Post a Comment