Open saltfish666 opened 6 years ago
hi.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE class SYSTEM "/usr/local/apache-tomcat-8.5.29/webapps/examples/spring2/xmlTest/hi.dtd">
<class>
<student>
<name>li</name>
<age>12</age>
<info>66666</info>
</student>
<student>
<name>shuai</name>
<age>22</age>
<info>77777</info>
</student>
</class>
hi.dtd
<!ELEMENT class (student+)>
<!ELEMENT student (name,age,info)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT info (#PCDATA)>
DTD
用来约束XML文件格式的。
(chrome 不行,用IDEA。)