I have to transport data in a xml file and saving them into a DB (I am using Windows + Apache + PHP + MySQL), and all that
work fine, but I want to validate de XML document with a DTD and here\'s the problem, because I have as a result no validation
at all...
I\'m posting some code as example,
eg.
<?xml version=\"1.0\"?>
<!DOCTYPE employee SYSTEM \"F:\path-to-file\employee.dtd\">
<employee category=\"A\">
<name>N.N</name>
<address>something</address>
<phone>something</phone>
</employee>
<!--Then the employee.dtd-->,
<!ELEMENT employee (name, address, phone) >
<!ATTLIST employee category ( A| B| C) >
<!ELEMENT name (#PCDATA) >
<!ELEMENT address (#PCDATA) >
<!ELEMENT phone (#PCDATA) >
Perhaps there is something wrong at the code, because if I write <employee category=\"J\"> no error is reported.
Any ideas?
Thanxs in advance.