// Parse the XML.
StringReader stringReader = new StringReader(s);
InputSource source = new InputSource(stringReader);
saxParser.parse(source);
} catch(SAXException e) {
throw new ProtocolException(
exceptionLocalizer.format("parse-error", s), e);
} catch(IOException e) {
// NOTE: we are currently reading from a string, so this ought
// never to happen anyway.
throw new ProtocolException(
exceptionLocalizer.format("parse-error", s), e);
}
// Add the parsed nodeValue into the dom, minus the root element.
Document document = domParser.getDocument();