View Single Post
Old 04-25-2011, 02:57 PM   PM User | #2
Mike_O
Regular Coder

 
Join Date: Apr 2009
Posts: 244
Thanks: 1
Thanked 20 Times in 20 Posts
Mike_O is an unknown quantity at this point
Hey NKeuxmuis,

I'm not quite sure how you're parsing the XML file. itm.<name>.Value? I've never seen that before :-) Anyway, you have to use the System.XML namespace (and I have a feeling you sort of are). But in any case, here is a sample:

http://www.codeproject.com/KB/cpp/parsefilecode.aspx

You should get a pretty good idea from there. So now, all you have to do is just loop through each element inside the <client> element. Here is some pseudo code:

Code:
String s;
for each itm in clients
 if itm.name = "interest" then
  s += itm.value;
 end if
next
Another thing, it's a bad practice to store tags inside a string for later output. If you need to create HTML tags dynamically, look into this sample:

http://www.w3schools.com/aspnet/control_htmltable.asp

You are able to create any HTML server control on the go.

There are also various data controls available to you, which act as a template, onto which you can directly bind data (XML or from a database). Here is a sample that applies to your situation:

http://www.w3schools.com/aspnet/aspnet_repeater.asp

Regards,
Mike
Mike_O is offline   Reply With Quote