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

  1. #1
    Registered User
    Join Date
    Apr 2003

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

    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 01:59 PM.

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

  3. #3
    Registered User
    Join Date
    Apr 2002
    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 ( 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.

    Sorry - No witty sig for today. Need Beer.

Popular pages Recent additions subscribe to a feed