}
@NotNull
public String createXML() throws QueryParseException {
if (this.query == null) {
throw new QueryParseException("Query object can not be null");
}
try {
createDocument();
createDOMTree();
XMLOutputter serializer = new XMLOutputter();
Format format = Format.getPrettyFormat();
StringWriter st = new StringWriter();
serializer.setFormat(format);
serializer.output(dom, st);
return st.getBuffer().toString();
} catch (Exception e) {
throw new QueryParseException(e.getMessage(), e);
}
}