Im trying to validate my XML file with an external DTD. But I get this error every time.
Document root element "A", must match DOCTYPE root "test".
I canβt figure it out.
The idea of ββmy xml file is to keep it as short as possible. I think all this is good, but, as I said, I will not check. Does anyone have an idea?
This is my xml file
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE test SYSTEM "test.dtd"> <A> <B> <F>name</F> </B> <D>lastname</D> <F>name</F> </A>
And my DTD
<!ELEMENT A (B, (C|D), E?, (F, G?)+)> <!ELEMENT B (F|G)+> <!ELEMENT D (#PCDATA|C)*> <!ELEMENT F (#PCDATA)> <!ELEMENT G (#PCDATA)> <!ELEMENT C (#PCDATA)> <!ELEMENT E (#PCDATA)>
thanks
xml
Dymond
source share