saving XML into database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tezu
    New Member
    • Dec 2008
    • 39

    saving XML into database

    hi all,
    I have developed a code which writes into an xml ,after writing im saving them as XML file only. i want to know how can i save it into a database.
    Is there any function available for doing so ???


    Thank u,
    tezu
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    you can save it like any other text. make sure the encoding of the file and the database matches.

    regards

    Comment

    • tezu
      New Member
      • Dec 2008
      • 39

      #3
      Hi,

      But how do i store it??? actually im new to this database and xml stuff so if u could lemme know more it would be helpfull

      thank u

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        Originally posted by tezu
        But how do i store it?
        what do you mean? you store it like any other text, that's all.

        Comment

        • tezu
          New Member
          • Dec 2008
          • 39

          #5
          i mean do i have to make a database connection or something???

          Comment

          • tezu
            New Member
            • Dec 2008
            • 39

            #6
            im using this function to save to a file.


            Code:
            {
            _variant_t varString = strFileName;
                parser->myComPtrDocument->save(varString);
                return true;
            }
            now i want to store this file to an existing database using void pointer ,
            Last edited by Dormilich; Jan 9 '09, 06:45 AM. Reason: added [code] tags

            Comment

            • Dormilich
              Recognized Expert Expert
              • Aug 2008
              • 8694

              #7
              Originally posted by tezu
              i mean do i have to make a database connection or something???
              of course you have to. use the database functions your language provides. which are basicly 2: one for connecting and one to execute the query.

              Comment

              • tezu
                New Member
                • Dec 2008
                • 39

                #8
                ok , il try it

                thanks a lot

                Comment

                • skitsanos
                  New Member
                  • Jan 2009
                  • 3

                  #9
                  there is a number of databases that supports XML natively, one of their data types exactly XML when in simple databases maximum you could have is TEXT only. You want to deal with XML in database naturally you have two ways one is to use XML enabled databases like Microsoft SQL 2005/2008 or IBM DB2 (both of them have free Express editions) or use native XML databases like Berkeley DB XML (unfortunately was acquired by Oracle), Sedna, MarkLogic...

                  Comment

                  • tezu
                    New Member
                    • Dec 2008
                    • 39

                    #10
                    hey thank u so much

                    tezu

                    Comment

                    Working...