以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XQuery/XLink/XPointer/ 』  (http://bbs.xml.org.cn/list.asp?boardid=14)
----  如何写这个 XQuery在 SQL 2005中?谢谢!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=14&rootid=&id=22691)


--  作者:mycwcgr
--  发布时间:10/1/2005 1:20:00 PM

--  如何写这个 XQuery在 SQL 2005中?谢谢!
How to write the XQuery in SQL 2005? could you help me?

I have stored the XML Section 1 (like disk directory structure) in a XML column in SQL 2005 database, I hope to get the XML just Section 2 using XQuery,
but I don't know how to write the XQuery, could you help me?

//----------------------------- Section 1----------------------------------
<?xml version="1.0" encoding="utf-8" ?>

<Folder Name="Root" Id="a6dce8fe-749c-4e38-ab2f-3d03d9711b3d">

  <Bookmark BId="f8dce8hj-846c-4e38-ab2f-6d03d9711b80">
    <Title>CodeGuru Forums - ASP.NET</Title>
    <Url>http://www.codeguru.com/</Url>
    <Description>This is a good site</Description>
    <InputDate> 2005-12-23</InputDate>
    <IsPrivate>False</IsPrivate>
  </Bookmark>

  <Bookmark BId="fgdce3ak-846c-4e38-ab2f-8i03d9711b23">
    <Title>We ll e-mail your press release</Title>
    <Url>http://www.dpdirectory.com/</Url>
    <Description>This is a good site</Description>
    <InputDate> 2004-11-23</InputDate>
    <IsPrivate>False</IsPrivate>
  </Bookmark>
  

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

    <Bookmark BId="ghdce3ak-456c-4e38-ab2f-5h02d9711b67">
      <Title>Welcome to ePassporte</Title>
      <Url>https://www.epassporte.com/</Url>
      <Description>Very Good</Description>
      <InputDate> 2004-08-12</InputDate>
      <IsPrivate>True</IsPrivate>
    </Bookmark>

    <Bookmark BId="fkdfh3a8-456c-6y38-jk2f-5h0gh9711b45">
      <Title>Keystone DreamCard</Title>
      <Url>https://www.mydreamcardonline.com</Url>
      <Description>Please note</Description>
      <InputDate> 2004-09-25</InputDate>
      <IsPrivate>True</IsPrivate>
    </Bookmark>    

    <Folder Name="Card1in1" Id="l9dcf8fe-689c-0935-fghj-7u03d9711b5t">    
       <Bookmark BId="ghdfh3a8-896c-6y40-jkfg-5h0gh9711b89">      
         <Title>The News of CNN</Title>
         <Url>https://www.cnn.com</Url>
         <Description>Please note</Description>
         <InputDate> 2004-09-23</InputDate>
         <IsPrivate>True</IsPrivate>
       </Bookmark>
    </Folder>

  </Folder>


  <Folder Name="Card2" Id="67dcf8fe-734c-4e56-ab2f-6d03d9711bfg">
  
  </Folder>


</Folder>
//----------------------------- Section 1----------------------------------


//----------------------------- Section 2----------------------------------
<?xml version="1.0" encoding="utf-8" ?>

<Folder Name="Root">

  <Bookmark Title="CodeGuru Forums - ASP.NET" Url="http://www.codeguru.com/">
  </Bookmark>

  <Bookmark Title="We ll e-mail your press release" Url="http://www.dpdirectory.com/">
  </Bookmark>

  <Folder Name="Card1">

    <Bookmark Title="Welcome to ePassporte" Url="https://www.epassporte.com/">
    </Bookmark>

    <Bookmark Title="Keystone DreamCard" Url="https://www.mydreamcardonline.com">
    </Bookmark>    

    <Folder Name="Card1in1">    
       <Bookmark Title="The News of CNN" Url="https://www.cnn.com">      
       </Bookmark>
    </Folder>

  </Folder>

  <Folder Name="Card2">
  </Folder>

</Folder>
//----------------------------- Section 2----------------------------------



W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
437.500ms