I work with dbUnit for the first time. I took the sample dtd from here :
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT dataset (table+) | ANY>
<!ELEMENT table (column*, row*)>
<!ATTLIST table
name CDATA #REQUIRED
>
<!ELEMENT column (#PCDATA)>
<!ELEMENT row (value | null | none)*>
<!ELEMENT value (#PCDATA)>
<!ELEMENT null EMPTY>
I get the following error:
org.dbunit.dataset.DataSetException: Line 2: The declaration for element type "dataset" must end with '>'.
What does that mean? I'm confused because I took the original dtd and secondly there is a '>' at the end of the dataset definition.
Thank you for your help!
Changing the first line to:
<!ELEMENT dataset (table+ | ANY)>
will make the syntax correct.
However, the model may just as well be:
<!ELEMENT dataset ANY>
as the "ANY" context specification will match table elements anyway (and more, see: http://www.w3.org/TR/xml/#sec-logical-struct )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.