July 11th, 2001, 11:13 AM
Join Date: May 2001
Time spent in forums: < 1 sec
Reputation Power: 0
newbie at XML, please help!
I have to port data in a xml file and putting 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
I'm posting some code as example,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE employee SYSTEM "F:\path-to-file\employee.dtd">
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 way I am working with, because if I write <employee category="J"> no error is reported.
thanxs in advance.
Last edited by angel : July 11th, 2001 at 01:34 PM.