I'm fairly new at the dbUnit and I'm facing a bit of a problem. In my source table I have a column which is "XML_HEADER", the contents of this will always be in the XML format. Now, I am creating a sample dataset for my testing and I have put the XML for the field in the dataset.xml like:
XML_HEADER="<?xml version='1.0' encoding='IBM-1140'?><Data><...></Data>"
But I'm getting the error:
Caused by: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 239;
The value of attribute "XML_HEADER" associated with an element type "Table" must not contain the '<' character.
How do I format the sample data? Do I need to make changes in order to handle the incoming field?
Wrap the XML value string in CDATA, e.g.
"<![CDATA[<?xml version='1.0' encoding='IBM-1140'?><Data><...>]]>"