1
Answer

Generate HTML string from an XML

pedram

pedram

11y
1.2k
1
    //My C# code
XmlTextReader reader = new XmlTextReader(@"D:\test.xml"); while (reader.Read()) { switch (reader.NodeType) { case XmlNodeType.Element: htmlstring+=reader.Name; break; case XmlNodeType.Text: htmlstring += reader.Value; break; } }

//My xml document

<Groups>
<Group1>
<Item1>
<GUID>124342345</GUID>
<Title>Name</Title>
<Type>Button</Type>
</Item1>
</Group1>
</Groups>

Answers (1)