/**
* Check the given document against the list of XPath statements provided.
*
* @param doc the XML document
* @return Returns a content worker that was matched or <tt>null</tt>
*/
private W processDocument(Document doc)
{
for (Map.Entry<String, W> entry : workersByXPath.entrySet())
{
try
{
String xpath = entry.getKey();
W worker = entry.getValue();
// Execute the statement
Object ret = xpathFactory.newXPath().evaluate(xpath, doc, XPathConstants.NODE);
if (ret != null)
{
// We found one
return worker;
}
}
catch (XPathExpressionException e)
{
// We accept this and move on
}
}
// Nothing found
return null;
}
XPathContentWorkerSelector.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:alfresco-repository
作者:
评论列表
文章目录