private void validateXmlResult(Element resultXml) throws KalturaApiException {
Element resultElement = null;
try {
resultElement = XmlUtils.getElementByXPath(resultXml, "/xml/result");
} catch (XPathExpressionException xee) {
// AZ (unicon) - necessary in order to debug
String resultXmlStr;
try {
Document document = resultXml.getOwnerDocument();
DOMImplementationLS domImplLS = (DOMImplementationLS) document.getImplementation();
LSSerializer serializer = domImplLS.createLSSerializer();
resultXmlStr = serializer.writeToString(resultXml);
} catch (Exception e) {
resultXmlStr = "Unable to get XML result: "+e;
}
throw new KalturaApiException("XPath expression exception ("+xee+") evaluating result:"+resultXmlStr);
}
if (resultElement != null) {
return;
} else {
throw new KalturaApiException("Invalid result");
}
}
KalturaClientBase.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:kaltura-ce-sakai-extension
作者:
评论列表
文章目录