extracting data from a database and converting it into an XML file

This is a discussion on extracting data from a database and converting it into an XML file within the C++ Programming forums, part of the General Programming Boards category; hey, I need some ideas, suggestions for a task I am working at work these days. We want to do ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    21

    extracting data from a database and converting it into an XML file

    hey,
    I need some ideas, suggestions for a task I am working at work these days.
    We want to do that in C or C++.

    I have several tables from a database (Oracle).
    I need to extract data from these tables, and then convert it into an XML file.
    We are now working on the TAGS that will compose this XML file and the mapping, that is the corresponding extracted data, associated to the TAGS.

    Has anyone done that ? How would you do that ?
    Is there an STL class that handles XML ? etc ..
    Thanks a lot for your help !
    Last edited by lonbgeach; 03-03-2004 at 12:59 PM.

  2. #2
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    Using MSVC?
    Do not make direct eye contact with me.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    110
    There are no STL libs that handle XML, and for that matter last time I checked Boost didn't offer any either.

    What I would suggest is looking into libXML2 (http://www.xmlsoft.org) as it is a nice cross platform (DOM/SAX) XML parser developed by the gnome people.

    While it is a generic C parser, wrapping function calls and the likes inside of a C++ class shouldn't be to hard and is probably what you would be doing anyway.

    I have used libXML2 for data retrieval before with great success, and am currently nutting out using it's DOM interface for creating XML trees.

    Hope this helps.
    If you want some more specific answers, then please provide OS Version that you are developing on and that which you are deploying the program on, aswell as IDE and compiler versions.

    Later,
    WebmasterMattD
    http://www.webmastermattd.net
    ------
    Sorry - No witty sig for today. Need Beer.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21