Forum Discussion

MartinSpamer's avatar
MartinSpamer
Frequent Contributor
12 years ago

XmlSlurper and DTD

Is possible to control the expected location of the DTD when using xmlSlurper, e.g. if I have some Groovy Script similar to :


def xmlSlurper = new XmlSlurper()
def xmlResponse = xmlSlurper.parseText( testResponse )


This looks in the SOAPUI bin folder for the DTD.

The webservice I'm testing exist in multiple versions, during migration I need the ability to test against both version from within the same TestSuite to ensure compatibility and this seems like an entirely reasonable test requirement. Therefore I would like to be able to control the location of the used DTD to be a either ./v6/ or ./v7/ folders under the project folder.

I notice there are getDTDHandler & setDTDHandler but these seem to undocumented.

Can you point me towards any examples;

Had anybody tried anything similar ?
No RepliesBe the first to reply