DTD举例二
DTD举例二:
1 <!--hbase语句库约束文件--> 2 <!DOCTYPE hbaseGroup [ 3 <!ELEMENT hbaseGroup (statements*)> 4 <!ATTLIST hbaseGroup id CDATA #REQUIRED> 5 6 <!ELEMENT statements (statement*)> 7 <!ATTLIST statements id CDATA #REQUIRED> 8 <!ATTLIST statements type CDATA #REQUIRED> 9 10 <!ELEMENT statement (property*)> 11 12 <!ELEMENT property (#PCDATA)> 13 <!ATTLIST property type CDATA #REQUIRED> 14 15 ]>
XML范例:
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE hbaseGroup SYSTEM 3 "file:///C:/workspace/Tools/UpdateProject/script_update_common/src/main/resources/DTD/project/hbaseGroup.dtd"> 4 <hbaseGroup id=""> 5 <statements id="" type=""> 6 <statement> 7 <property type=""></property> 8 <property type=""></property> 9 </statement> 10 </statements> 11 <statements id="" type=""> 12 <statement> 13 <property type=""></property> 14 <property type=""></property> 15 <property type=""></property> 16 </statement> 17 </statements> 18 </hbaseGroup>