Hi

Please help me, i am stuck with this. My xml will be generated dynamically .i.e it is not the same always and it doesnot have the same elements or same number of nodes always, it may grow or shrink. How to convert this kind of xml to html in c#

I am using XpathNavigator to query the xml data, this works fine but i need to dislpay the entire xml in browser, for which i need to convert it into hmtl. How to achieve this.

Thnk you

Are you using the XML to hold data and need to put that data into your page? If yes, data tables can respond to XML just as easily as they use databases so you can use the XML as the data source for a repeater or grid view.
Or do you need to put the actual element names into the page, not just the element's contents?

Thanks for the solution. But i need to convert the xml to html ..... With tabels its working fine.... how can i dynamically create table in Html since my xml wont be constant always

A datagrid can be bound to an XML data source. It will automatically pull through all of the data, the number of columns and the column names, etc and display it on the page.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.