-
writing class to xml
Hi,
This is the scenario. A customer has id, name and purchased items. the item has item id and description. Customer can purchse any number of items. for this i have a customer class and item class. i want to produce a xml like following :
<Customers>
<Customer>
<ID>25</ID>
<Name>John</Name>
<Items>
<ItemID>1</ID>
<ItemDescription>Book1</ID>
</Items>
<Items>
<ItemID>2</ID>
<ItemDescription>Book2</ID>
</Items>
</Customer>
<Customer>
<ID>26</ID>
<Name>Tim</Name>
<Items>
<ItemID>4</ID>
<ItemDescription>Book4</ID>
</Items>
<Items>
<ItemID>1</ID>
<ItemDescription>Book1</ID>
</Items>
</Customer>
</Customers>
And i am not getting these values from db. without a dataset will it be possible..?
Thanx.
Arjun.
sp
-
What database are you using & what is the way you are retreiving the data from database(technology wise)?
Similar Threads
-
By jrothlander in forum .NET
Replies: 1
Last Post: 07-08-2005, 02:02 PM
-
Replies: 8
Last Post: 08-23-2002, 04:35 PM
-
By Robert C. Cain in forum .NET
Replies: 3
Last Post: 01-27-2002, 01:40 AM
-
By Patrick Ireland in forum .NET
Replies: 3
Last Post: 05-07-2001, 03:04 PM
-
By HSIN NING in forum XML
Replies: 0
Last Post: 08-21-2000, 12:17 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks