DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    101

    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

  2. #2
    Join Date
    Dec 2005
    Posts
    2
    What database are you using & what is the way you are retreiving the data from database(technology wise)?

Similar Threads

  1. Reading & Writing XML from Datasets
    By jrothlander in forum .NET
    Replies: 1
    Last Post: 07-08-2005, 02:02 PM
  2. XML files vs Database
    By Mansoor in forum XML
    Replies: 8
    Last Post: 08-23-2002, 04:35 PM
  3. Call shared method without class instantiation?
    By Robert C. Cain in forum .NET
    Replies: 3
    Last Post: 01-27-2002, 01:40 AM
  4. How To Do It - Shared Class Variables Part IV
    By Patrick Ireland in forum .NET
    Replies: 3
    Last Post: 05-07-2001, 03:04 PM
  5. XML Security
    By HSIN NING in forum XML
    Replies: 0
    Last Post: 08-21-2000, 12:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links