Ogshacpaflhhs
New Member
I have a dtd file. In this file some of the Attributes are required for an element eg:\[code\]<!ELEMENT NAME (LASTNAME)><!ATTLIST NAME SEX CDATA #REQUIRED >\[/code\]Now while parsing the file if the attribute is now present then an error is thrown and the parsing ends; which is fine. But what if the NAME element is like this:\[code\]<NAME SEX=""> <LASTNAME>Doe</LASTNAME></NAME>\[/code\]Where the attribute is there but there is no value.How do I check for this while parsing the xml against the dtd.