XML数据库文档使用PYX

ZDNet软件频道 时间:2003-02-17 作者:Techmail 代码页 |  我要评论()
本文关键词:techmail

<?xml version="1.0"?>
<!DOCTYPE books SYSTEM "books.dtd">
<books>
  <book isbn="0316769533" date="1951-06">
    <title>Catcher in the Rye</title>
    <author>Jerome David Salinger</author>
    <publisher>Little Brown &amp; Company</publisher>
  </book>
  <book isbn="0446310786" date="1988-10">
    <title>To Kill a Mockingbird</title>
    <author>Harper Lee</author>
    <publisher>Little Brown &amp; Company</publisher>
  </book>
</books>


And the associated DTD, books.dtd:


<!ELEMENT books (book*)>
<!ELEMENT book (title,author,publisher)>
<!ATTLIST book  isbn CDATA #REQUIRED date CDATA #IMPLIED>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>

百度大联盟认证黄金会员Copyright© 1997- CNET Networks 版权所有。 ZDNet 是CNET Networks公司注册服务商标。
中华人民共和国电信与信息服务业务经营许可证编号:京ICP证010391号 京ICP备09041801号-159
京公网安备:1101082134