<?xml version= "1.0 " encoding= "GB2312 "?>
<!DOCTYPE company
[
<!ELEMENT company (employee)>
<!ELEMENT employee (name,age,sex,salary)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT sex (#PCDATA)>
<!ELEMENT salary (cash|credit_card)> <font size=+5 color=red> /* <------here*/ </font>
<!ELEMENT cash (#PCDATA)>
<!ELEMENT credit_card (#PCDATA)>
]
>
<company>
<employee>
<name> 张三 </name>
<age> 18 </age>
<sex> 男 </sex>
<salary>
<cash> 2000.00 </cash>
<credit_card> aa </credit_card>
</salary>
</employee>
</company>
理论上应该有错 . 老孙的视频里报错 他用XML SPY 我用IE+NOTEPAD... 没错 晕?
------解决方案--------------------
<font size=+5 color=red> /* <------here*/ </font> 干啥的?不应该要这些
------解决方案--------------------
你想报什么错啊?
------解决方案--------------------
<!DOCTYPE company
[
<!ELEMENT company (employee)>
<!ELEMENT employee (name,age,sex,salary)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT sex (#PCDATA)>
<!ELEMENT salary (cash,credit_card)>
<!ELEMENT cash (#PCDATA)>
<!ELEMENT credit_card (#PCDATA)>
]
>
看看这样可可行?