Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thoughts on loading distinct xml values to a repeater control

Status
Not open for further replies.

meckeard

Programmer
Aug 17, 2001
619
US
Hi all,

I have a web service that I call that returns 3 sets of xml strings. Ultimately, I need to load all the distinct records from these 3 strings and bind them to a repeater control and I'm struggling with how to accomplish this.

The xml strings return orders. Each record has an order_id. But an order_id can appear in each string of xml and I can't show them multiple times. I need each order to show only once and preferably in order.

Here is a sample of the strings of xml:
<root>
<results>
<root>
<order><order_id>1</order_id></order>
<order><order_id>2</order_id></order>
<order><order_id>3</order_id></order>
</root>
</results>
</root>

Any suggestions on the best way to approach this?

Thanks,
Mark
 
Assuming that all the xml is the same schema you could do this.
1) Load the first XML into a dataset.
2) Load the second XML into a second dataset
3) Load the third xml into a third dataset
4) Merge the second dataset into the first
5) Merge the third dataset into the first
6) Bind to the first dataset

Here is a link, You'll have to play with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top