< ?xml versi encoding="euc-kr"?>
<!DOCTYPE book SYSTEM "./booktest.dtd">
<book>
 <title>프로그래를 위한 EJB</title>
 <author>이성희</author>
 <publisher>프리렉</publisher>
 
 <tableOfContents showPageNumbers = "yes" >
  <tocEntry>J2EE 환경설정</tocEntry>
  <tocEntry>XML</tocEntry>
  <tocEntry>셔션 빈과 엔티티 빈</tocEntry>
 </tableOfContents>
</book>

 

 

<!ELEMENT book (title, author, publisher, tableOfContents)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT tableOfContents (tocEntry*)>
<!ATTLIST tableOfContents showPageNumbers CDATA>
<!ELEMENT tocEntry (#PCDATA)>

 

 

제일위는 원본 xml파일  아래는 제가 임으로만들었다가 에러뜨는 dtd파일

 

xml에해당하는 dtd파일좀 댓글 달아주세요