Last post Mar 01, 2017 07:53 AM by tandohtakyie
Feb 28, 2017 01:48 PM|tandohtakyie|LINK
How can i create object class list of this xml and display the value of the elements on a webpage.
<?xml version="1.0" encoding="utf-8" ?>
Feb 28, 2017 03:08 PM|raju dasa|LINK
Check this site for converting xml data to c# objects:
after converted, assign that c# list to gridview or repeater to show on webpage.
Feb 28, 2017 03:42 PM|tandohtakyie|LINK
I've already tried this process but i still didn't come up with good result. Do you perhaps have another option for me?
Looking forward for your reply
Thanks in advance
Feb 28, 2017 04:17 PM|PatriceSc|LINK
It is always easier to help when knowing what goes wrong. What do you mean with "didn't come up with good result". It might be easier to fix the problem you have rather than to just try something else because you have some kind of unknown issue.
Also an approach that I'm using often is doing things the other way round ie I create first the data structure I want and then persist this data structure to XML. I can then compare both XML documents to spot possible issues with the current document until
they are close enough (sometimes spotting errors in the source XML document for example here I'm not sure the date/time uses the usual XML format). IMHO the problem is that XML documents are often created "by hand" using low level stuff and so they don't
always follow very strict rules.
Mar 01, 2017 06:35 AM|Cathy Zou|LINK
As far as I know. The process could be finished by using visual studio.
In Visual Studio 2013 there is a new feature that can create a class with its properties on behalf of you according to the passed XML string. So rather than manually writing a class with lots of properties to map your XML structure, Visual Studio 2013 does
it for you.
Mar 01, 2017 07:53 AM|tandohtakyie|LINK
i think i made a mistake with my request, what i actually meant was that i've already generated the classes,
but the question was , how can i display it on a webpage when the page is loaded?