Storing xml document as data in database


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Storing xml document as data in database

Hybrid View

  1. #1
    Madhu Guest

    Storing xml document as data in database


    Hi ,

    Any body can help me in storing XML document in oracle database as a data
    but not as a just string.

    thanks
    madhu

  2. #2
    Jay Guest

    Re: Storing xml document as data in database


    Try storing it as a long datatype. I cache quite a bit of XML for a web application
    in a long, and it works very well. I'm accessing Oracle with ADO, and you
    can retrieve the long with a simple select statement. Oracle recommends
    storing the data in a CLOB column, due to the fact that Oracle will phase
    out the long datatype in future releases. Plus, CLOB's are more versatile
    than longs. However, you can return a CLOB using a SQL statement with ADO.
    You have to convert the CLOB to a Long, and return it as a return value/output
    parameter from a stored function/procedure. Longs are much easier to work
    with, however if you can get away with using CLOB's, then go with the CLOB
    solution for future compatibility.

    "Madhu" <mbalguri@worldbank.org> wrote:
    >
    >Hi ,
    >
    >Any body can help me in storing XML document in oracle database as a data
    >but not as a just string.
    >
    >thanks
    >madhu



  3. #3
    Rob Guest

    Re: Storing xml document as data in database


    Jay is right, a long data type is the way to go. But remember that if you
    are using Microsoft's ODBC (or OLEDB) driver with Oracle 8.x the most you
    can "insert" or "update" is 4k. (If you are using 7.x the limit is 2k)
    If you need to store more than 4k then you have to use rsXML.addnew and/or
    rsXML.update.

    "Jay" <jay_broni@hotmail.com> wrote:
    >
    >Try storing it as a long datatype. I cache quite a bit of XML for a web

    application
    >in a long, and it works very well. I'm accessing Oracle with ADO, and you
    >can retrieve the long with a simple select statement. Oracle recommends
    >storing the data in a CLOB column, due to the fact that Oracle will phase
    >out the long datatype in future releases. Plus, CLOB's are more versatile
    >than longs. However, you can return a CLOB using a SQL statement with ADO.
    > You have to convert the CLOB to a Long, and return it as a return value/output
    >parameter from a stored function/procedure. Longs are much easier to work
    >with, however if you can get away with using CLOB's, then go with the CLOB
    >solution for future compatibility.
    >
    >"Madhu" <mbalguri@worldbank.org> wrote:
    >>
    >>Hi ,
    >>
    >>Any body can help me in storing XML document in oracle database as a data
    >>but not as a just string.
    >>
    >>thanks
    >>madhu

    >



  4. #4
    Marko Draisma Guest

    Re: Storing xml document as data in database


    You really should read <a href="http://www.oreilly.com/catalog/orxmlapp/">Building
    Oracle XML Applications</a> by Steve Muench. Are the xml-documents to be
    inserted as such, or do you want to convert them to tables? Either way, this
    book gives you all the answers you need.

    good luck,

    Marko.


    "Rob" <collinsrs2000@yahoo.com> wrote:
    >
    >Jay is right, a long data type is the way to go. But remember that if you
    >are using Microsoft's ODBC (or OLEDB) driver with Oracle 8.x the most you
    >can "insert" or "update" is 4k. (If you are using 7.x the limit is 2k)


    >If you need to store more than 4k then you have to use rsXML.addnew and/or
    >rsXML.update.
    >
    >"Jay" <jay_broni@hotmail.com> wrote:
    >>
    >>Try storing it as a long datatype. I cache quite a bit of XML for a web

    >application
    >>in a long, and it works very well. I'm accessing Oracle with ADO, and

    you
    >>can retrieve the long with a simple select statement. Oracle recommends
    >>storing the data in a CLOB column, due to the fact that Oracle will phase
    >>out the long datatype in future releases. Plus, CLOB's are more versatile
    >>than longs. However, you can return a CLOB using a SQL statement with

    ADO.
    >> You have to convert the CLOB to a Long, and return it as a return value/output
    >>parameter from a stored function/procedure. Longs are much easier to work
    >>with, however if you can get away with using CLOB's, then go with the CLOB
    >>solution for future compatibility.
    >>
    >>"Madhu" <mbalguri@worldbank.org> wrote:
    >>>
    >>>Hi ,
    >>>
    >>>Any body can help me in storing XML document in oracle database as a data
    >>>but not as a just string.
    >>>
    >>>thanks
    >>>madhu

    >>

    >



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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center