SAXBuilder builder = new SAXBuilder();
reader = new StringReader(xmlStr);
Document xmlJDoc = builder.build(reader);
return xmlJDoc.getRootElement();
} catch (Exception e) {
throw new JThinkRuntimeException(
JThinkErrorCode.ERRCODE_XML_XML_STRING_LOAD_FAILED,
"解析XML串为org.jdom.Element时发生异常!", e);
}finally{
if(reader!=null){
try {
reader.close();
} catch (IOException e1) {
throw new JThinkRuntimeException(e1);
}
}
}
}