class ResponseDescriptorParser implements NodeParser<ResponseDescriptor> {

    @Override
    public ResponseDescriptor parseNode(final Node responseDescriptorNode, final Document document) {
        ResponseDescriptor responseDescriptor = null;
        if (responseDescriptorNode != null) {
            Element el = (Element) responseDescriptorNode;
            ResponseDescriptorAttributes attributes = getAttributes(el, document);
            Set<ResponseFormatterDescriptor> responseFormatters = templateDescriptorParser.parseNode(el, document);
            responseDescriptor = new ResponseDescriptor(attributes, responseFormatters);
        }
        return responseDescriptor;
    }

}