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