CharArrayReader xml = new CharArrayReader(sld_body.toCharArray()); // put the xml into a 'Reader'
rootNode = generateDOM(xml);
// validate the SLD
SLDValidator validator = new SLDValidator();
String baseURL = ResponseUtils.baseURL(request);
List errors = validator.validateSLD(fs, baseURL);
if (errors.size() != 0) {
throw new SldException(SLDValidator.getErrorMessage(xml, errors));
}
} finally {