-
Xml Dtd Parsing Problem
I just want to know how to parse the xml with dtd so that i can get whether the xml is valid or not in browser.
I made the dtd and included it in the xml. But the checks which i specified in the dtd is not getting applied in xml though the dtd is parsed with xml in browser.
When i used an xml parser named nsgmls then it performed the checks properly but i need it in the browser(IE 6.0).
My Dtd: films-1.dtd
<!ELEMENT filmlist (film+)>
<!ELEMENT film (name,director+)>
<!ATTLIST film
identifier ID #REQUIRED
classification (G|PG|PG13|R|NC17) "R" >
<!ELEMENT name (#PCDATA)>
<!ELEMENT director (firstname, midinitial?,lastname)>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT lastname (#PCDATA)>
<!ENTITY movdirec "<firstname>Sam</firstname>
<lastname>Jones</lastname>">
My Xml: films.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE filmlist SYSTEM "films-1.dtd">
<filmlist>
<film identifier="ole1" classification="R">
<name>Taxi Driver</name>
<director>
<firstname>Martin</firstname>
<lastname>Williams</lastname>
</director>
</film>
<film identifier="ole2">
<name>Rider</name>
<director>
<firstname>Sumit</firstname>
<lastname>Goel</lastname>
</director>
<director1>
<firstname>Sumit</firstname>
<lastname>Goel</lastname>
</director1>
<director>
&movdirec;
</director>
</film>
</filmlist>
I am eagerly waiting for the same.
Thanks.