本文整理了Java中org.joox.Match.content()
方法的一些代码示例,展示了Match.content()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Match.content()
方法的具体详情如下:
包路径:org.joox.Match
类名称:Match
方法名:content
[英]Get the XML content of the first element in the set of matched elements, or null
if there are no matched elements.
This is the same as calling content(0)
[中]获取匹配元素集中第一个元素的XML内容,如果没有匹配的元素,则获取null
。
这与呼叫content(0)
相同
代码示例来源:origin: org.jboss.windup.rules.apps/windup-rules-java-ee
private Map<String, Integer> parseTxTimeout(Element elementRef, String ejbName)
{
Map<String, Integer> transactionTimeouts = new HashMap<>();
for (Element methodRef : $(elementRef).child("method-attributes").find("method").get())
{
String methodName = $(methodRef).child("method-name").content();
String transactionTimeout = $(methodRef).child("transaction-timeout").content();
if(StringUtils.isNotBlank(transactionTimeout)) {
try {
Integer txTimeout = Integer.parseInt(transactionTimeout);
transactionTimeouts.put(methodName, txTimeout);
}
catch(Exception e) {
LOG.info("EJB: "+ejbName+" contains bad reference to TX Timeout on Method: "+methodName);
}
}
}
return transactionTimeouts;
}
代码示例来源:origin: windup/windup
private Map<String, Integer> parseTxTimeout(Element elementRef, String ejbName)
{
Map<String, Integer> transactionTimeouts = new HashMap<>();
for (Element methodRef : $(elementRef).child("method-attributes").find("method").get())
{
String methodName = $(methodRef).child("method-name").content();
String transactionTimeout = $(methodRef).child("transaction-timeout").content();
if(StringUtils.isNotBlank(transactionTimeout)) {
try {
Integer txTimeout = Integer.parseInt(transactionTimeout);
transactionTimeouts.put(methodName, txTimeout);
}
catch(Exception e) {
LOG.info("EJB: "+ejbName+" contains bad reference to TX Timeout on Method: "+methodName);
}
}
}
return transactionTimeouts;
}
代码示例来源:origin: eu.fbk.pikes/pikes-resources
String text = JOOX.$(element).find("TEXT").content();
if (text.length() == 0) {
LOGGER.error("TEXT is empty");
代码示例来源:origin: eu.fbk.pikes/pikes-resources
File outputFile = new File(outputFilePattern + "-" + i + ".naf");
String text = JOOX.$(element).find("TEXT").content();
if (text == null || text.length() == 0) {
LOGGER.error("TEXT is null");
代码示例来源:origin: io.teecube.t3/t3-site-enhancer
String content = td.content();
content = content.replace("(no description)", parameter.description());
td.content(content);
div.content(parameter.description());
代码示例来源:origin: io.teecube.t3/t3-site-enhancer
@Override
public void processHTMLFile(File htmlFile) throws Exception {
addHTMLEntities(htmlFile);
Match document;
Match reportsMenu;
Match infosMenu;
try {
document = JOOX.$(htmlFile);
reportsMenu = document.xpath("//div[@id='top-nav-collapse']/ul/li/ul/li[a/@title='Project Reports']");
infosMenu = document.xpath("//div[@id='top-nav-collapse']/ul/li/ul/li[a/@title='Project Information']");
} catch (Exception e) {
removeHTMLEntities(htmlFile);
return;
}
replaceByLine(htmlFile, "<li class=\"disabled\"><a title=\"#reports\">#reports</a></li>", reportsMenu.content());
replaceByLine(htmlFile, "<li class=\"disabled\"><a title=\"#infos\">#infos</a></li>", infosMenu.content());
document = JOOX.$(htmlFile);
document.xpath("//div[@id='top-nav-collapse']/ul/li[ul/li[a/@title='Project Reports']][2]").remove();
document.xpath("//footer/div/div/div/ul/li[a/@title='#infos']").remove();
document.xpath("//footer/div/div/div/ul/li[a/@title='#reports']").remove();
printDocument(document.document(), htmlFile);
removeHTMLEntities(htmlFile);
}
代码示例来源:origin: windup/windup
String ejbName = $(ejbRef).child("ejb-name").content();
String sessionClustered = $(ejbRef).child("clustered").content();
sessionClustered = StringUtils.trim(sessionClustered);
for (EjbSessionBeanModel ejb : ejbSessionBeanService.findAllByProperty(EjbSessionBeanModel.EJB_BEAN_NAME, ejbName))
String jndi = $(ejbRef).child("jndi-name").content();
String localJNDI = $(ejbRef).child("local-jndi-name").content();
String remoteBindingJNDI = $(ejbRef).child("remote-binding").child("jndi-name").content();
if (StringUtils.isNotBlank(jndi))
代码示例来源:origin: org.jboss.windup.rules.apps/windup-rules-java-ee
String ejbName = $(ejbRef).child("ejb-name").content();
String sessionClustered = $(ejbRef).child("clustered").content();
sessionClustered = StringUtils.trim(sessionClustered);
for (EjbSessionBeanModel ejb : ejbSessionBeanService.findAllByProperty(EjbSessionBeanModel.EJB_BEAN_NAME, ejbName))
String jndi = $(ejbRef).child("jndi-name").content();
String localJNDI = $(ejbRef).child("local-jndi-name").content();
String remoteBindingJNDI = $(ejbRef).child("remote-binding").child("jndi-name").content();
if (StringUtils.isNotBlank(jndi))
内容来源于网络,如有侵权,请联系作者删除!