DTD举例一
DTD举例一:
1 <!--动作库约束文件--> 2 <!DOCTYPE actionGroup [ 3 <!ELEMENT actionGroup (action*)> 4 <!ELEMENT action EMPTY> 5 6 <!ATTLIST action id CDATA #REQUIRED> 7 <!ATTLIST action fun CDATA #REQUIRED> 8 <!ATTLIST action type CDATA #REQUIRED> 9 <!ATTLIST action param CDATA #REQUIRED> 10 ]>
XML范例:
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE actionGroup SYSTEM 3 "file:///C:/workspace/Tools/UpdateProject/script_update_common/src/main/resources/DTD/project/actionGroup.dtd"> 4 5 <actionGroup> 6 <action type="" fun="" param="" id=""></action> 7 <action type="" fun="" param="" id=""/> 8 <action id="" fun="" type="" param=""></action> 9 </actionGroup>
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE actionGroup SYSTEM "http://10.15.1.242:2080/dtd/catf/actionGroup.dtd"> 3 4 <actionGroup> 5 <action id="" fun="" type="" param=""/> 6 <action id="" fun="" type="" param=""/> 7 </actionGroup>