DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005

    Is there a best way to store XML to database (SQL 2005 Express Edition)?

    Is there a best way to store XML to database (SQL 2005 Express Edition)?

    I'm doing a sample program about online bookmark, I have created two fields

    UserID Uniqueidentifier
    ContentOfBookmark I'm not sure what kind of field (ntext, XML or other field)

    I plan to store the following XML content to the field ContentOfBookmark, first I set the ContentOfBookmark field as ntext type,
    and restore the XML Content from the ContentOfBookmark field to a XML file, then use XMLReader to parse the XML file.

    Now I heard there is a new XML field in SQL 2005 , but I don't know how to use it.

    Do you think which kind of field I should use?
    what I think about the bookmark is correct?

    Is there a better way to resolve the hierarchical directory structure? If I store the structure in XML file, I think I can use many XML functions to operate bookmarks and folder easily such as add, delete bookmark; add delete folder...

    ========================== XML Content (ContentOfBookmark)============================================

    <?xml version="1.0" encoding="utf-8" ?>
    <Folder Name="Root" Id="a6dce8fe-749c-4e38-ab2f-3d03d9711b3d">
    <Title>CodeGuru Forums - ASP.NET</Title>
    <Description>This is a good site</Description>
    <InputDate> 2005-12-5</InputDate>

    <Title>We'll e-mail your press release</Title>
    <Description>This is a good site</Description>
    <InputDate> 2004-12-5</InputDate>

    <Folder Name="Card" Id="b8dcf8fe-749c-4e38-ab2f-6d03d9711b8j">

    <Title>Welcome to the bank</Title>
    <Description>Very Good</Description>
    <InputDate> 2004-08-5</InputDate>

    <Title>Keystone DreamCard</Title>
    <Description>Please note</Description>
    <InputDate> 2004-08-5</InputDate>



    ======================= XML Content (ContentOfBookmark)===============================================

  2. #2
    Join Date
    Nov 2003
    Portland, OR
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 1
    Last Post: 08-13-2002, 01:58 PM
  2. Data Junction Announces XML Junction 7.51
    By Tim Frost in forum xml.announcements
    Replies: 0
    Last Post: 04-02-2001, 10:53 AM
  3. Check out Turbo XML
    By Sales in forum xml.announcements
    Replies: 0
    Last Post: 07-20-2000, 06:18 PM
  4. XML docs stored in Database
    By Sai Anjesh in forum XML
    Replies: 0
    Last Post: 07-13-2000, 03:43 AM
  5. access any ODBC/OLEDB SQL d/base over the net
    By brett Goodman in forum XML
    Replies: 0
    Last Post: 04-04-2000, 01:31 AM

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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.