1dev1
asked on
putting xml result into a listbox
i am being returned an xml string from a webservice call
when i get the result i'm doing this
XmlDocument doc = new XmlDocument();
doc.Load(new StringReader(xmlresult));
i then have <asp:ListBox id="results" runat="server"></asp:ListB ox>
Is anyone able to show me how i populate the ListBox with the xml and a for loop?
I've googled but can't find a relevant example
The xml is like this
<?xml version="1.0" encoding="UTF-8"?>
<Top>
<Level1>
<Level1Detail>
<Id>xxx</Id>
<email>xxx@xxx.com</email>
<from>xxx@xxx.com</from>
<subject>xxx</subject>
</Level1Detail>
</Level1>
etc...
</Top>
when i get the result i'm doing this
XmlDocument doc = new XmlDocument();
doc.Load(new StringReader(xmlresult));
i then have <asp:ListBox id="results" runat="server"></asp:ListB
Is anyone able to show me how i populate the ListBox with the xml and a for loop?
I've googled but can't find a relevant example
The xml is like this
<?xml version="1.0" encoding="UTF-8"?>
<Top>
<Level1>
<Level1Detail>
<Id>xxx</Id>
<email>xxx@xxx.com</email>
<from>xxx@xxx.com</from>
<subject>xxx</subject>
</Level1Detail>
</Level1>
etc...
</Top>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.