正如标题所指出的那样,我是XML的新手,并不知道我到底错过了什么。我很确定我提到了所有元素,但仍然出现错误。任何帮助都非常感谢。
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE persons[
<!ELEMENT person (staff|student)>
<!ELENEMT staff (name,age,gender,address,staffid,subject)>
<!ELEMENT student (name,age,gender,address,rollno,standard,section)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT gender (#PCDATA)>
<!ELEMENT address (doorno,street,city,state)>
<!ELEMENT staffid (#PCDATA)>
<!ELEMENT subject (#PCDATA)>
<!ELEMENT rollno (#PCDATA)>
<!ELEMENT standard (#PCDATA)>
<!ELEMENT section (#PCDATA)>
<!ELEMENT doorno (#PCDATA)>
<!ELEMENT street (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT state (#PCDATA)>
]>
答案 0 :(得分:1)
你有一个错字:
<!ELENEMT staff (name,age,gender,address,staffid,subject)>
^^^