以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XML源码及示例(仅原创和转载) 』  (http://bbs.xml.org.cn/list.asp?boardid=32)
----  xml默认命名空间处理的问题 紧急求救  (http://bbs.xml.org.cn/dispbbs.asp?boardid=32&rootid=&id=21604)


--  作者:sprint200455
--  发布时间:8/29/2005 3:44:00 PM

--  xml默认命名空间处理的问题 紧急求救
我用的是vc7.0开发一个读取xml文件的程序,但是xml文件中有多个命名空间。请问默认命名空间怎么解析出来。如果有解析的方法请告知。谢谢了。msn:liqun_maxwell@hotmail.com.
--  作者:sprint200455
--  发布时间:8/29/2005 4:39:00 PM

--  
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://purl.org/rss/1.0/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
>
  <channel rdf:about="http://skonnard.com/blog/rss.xml">
    <title>The XML Files</title>
    <link>http://skonnard.com/blog</link>
    <description>by Aaron Skonnard</description>
    <image rdf:resource="http://skonnard.com/blog/images/image.gif" />
    <items>
      <rdf:Seq>
        <rdf:li resource=" http://skonnard.com/blog/entry1" />
        <rdf:li resource=" http://skonnard.com/blog/entry2" />
      </rdf:Seq>
    </items>
  </channel>
  <image rdf:about=" http://skonnard.com/blog/images/image.gif">
    <title>skonnard.com</title>
    <link>http://skonnard.com/blog</link>
    <url>http://skonnard.com/blog/images/image.gif</url>
  </image>
  <item rdf:about="http://skonnard.com/blog/entry1">
    <title>1st blog entry</title>
    <link>http://skonnard.com/blog/entry1</link>
    <description>This is my first blog entry.</description>
    <dc:date>2004-01-13T17:16:44.9803903-07:00</dc:date>
  </item>
  <item rdf:about="http://skonnard.com/blog/entry1">
    <title>2nd Blog Entry</title>
    <link>http://skonnard.com/blog/entry1</link>
    <description>This is my second blog entry.</description>
    <dc:date>2004-01-13T17:16:45.9803903-07:00</dc:date>
  </item>
</rdf:RDF>
其中rdf dc命名空间的可以解析出来 但是默认的就不行了
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms