xml dtd实例
关于dtd就不多介绍
?
以下是个实例,包含绝大多情况
?
<?xml version="1.0" encoding="UTF-8"?><!-- 被2012 () 使用XMLSpy v编辑的 (http://www.altova.com) by --><!--数据访问根节点--><!ELEMENT DataAccessLayer (mapper+)><!--数据映射,包含需要映射表、结果集与增删改查语句。--><!ELEMENT mapper (Methods+, table+, resultMap+, select+, update+, delete+, insert+)+><!ATTLIST mappernamespace ID #IMPLIED><!--数据源表--><!ELEMENT table (column+)+><!ATTLIST tableid ID #REQUIREDjdbcTableName CDATA #REQUIRED><!--数据列--><!ELEMENT column (many-to-one*, one-to-many*)+><!ATTLIST columnname ID #REQUIREDtype (date | timestamp | string | boolean | decimal) #FIXED "date"length CDATA #REQUIREDjdbcName CDATA #REQUIREDkeyColumn (true | false) #REQUIREDjdbcType (varchar | datetime | decimal) #REQUIREDjdbcComment CDATA #REQUIRED><!--表间关系:多对一。--><!ELEMENT many-to-one EMPTY><!ATTLIST many-to-onerefTable ID #REQUIREDunique (true | false) #IMPLIEDcascade (all | none | save-or-delete) #IMPLIED><!ELEMENT one-to-many EMPTY><!ATTLIST one-to-manyrefTable ID #REQUIREDcascade (all | none | save-or-delete) #IMPLIED><!ELEMENT Methods (#PCDATA)><!ATTLIST Methodsname CDATA #REQUIREDclass CDATA #REQUIRED>?
?
大家只要引用这个dtd,自然就知道其厉害之处。
不是我写的dtd,而是dtd
?