本文整理了Java中org.joox.Match.tag()
方法的一些代码示例,展示了Match.tag()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Match.tag()
方法的具体详情如下:
包路径:org.joox.Match
类名称:Match
方法名:tag
[英]Get the tag name of the first element in the current set of matched elements.
This is the same as calling tag(0)
[中]获取当前匹配元素集中第一个元素的标记名。
这与呼叫tag(0)
相同
代码示例来源:origin: org.jooq/joox-java-6
/**
* Return an path expression describing an element
*/
static final String path(Element element) {
StringBuilder sb = new StringBuilder();
Node iterator = element;
while (iterator.getNodeType() == Node.ELEMENT_NODE) {
sb.insert(0, $(iterator).tag());
sb.insert(0, "/");
iterator = iterator.getParentNode();
}
return sb.toString();
}
代码示例来源:origin: windup/windup
@Override
public List<AddonId> processElement(ParserContext context, Element element) throws ConfigurationException
{
List<Element> children = $(element).children().get();
List<AddonId> addonIds = new ArrayList<>();
for (Element child : children)
{
Object result = context.processElement(child);
switch ($(child).tag())
{
case "addon":
addonIds.add((AddonId)result);
break;
}
}
return addonIds;
}
代码示例来源:origin: org.jboss.windup.config/windup-config-xml
@Override
public List<AddonId> processElement(ParserContext context, Element element) throws ConfigurationException
{
List<Element> children = $(element).children().get();
List<AddonId> addonIds = new ArrayList<>();
for (Element child : children)
{
Object result = context.processElement(child);
switch ($(child).tag())
{
case "addon":
addonIds.add((AddonId)result);
break;
}
}
return addonIds;
}
代码示例来源:origin: org.jboss.windup.addon/config-impl
@SuppressWarnings("unchecked")
public <T> T processElement(Element element) throws ConfigurationException
{
String namespace = $(element).namespaceURI();
String tagName = $(element).tag();
ElementHandler<?> handler = handlers.get(new HandlerId(namespace, tagName));
if (handler != null)
{
Object o = handler.processElement(this, element);
return (T) o;
}
throw new ConfigurationException("No Handler registered for element named [" + tagName
+ "] in namespace: [" + namespace + "]");
}
代码示例来源:origin: org.jboss.windup.config/windup-config-xml
/**
* Process the provided {@link Element} with the appropriate handler for it's namespace and tag name.
*/
@SuppressWarnings("unchecked")
public <T> T processElement(Element element) throws ConfigurationException
{
String namespace = $(element).namespaceURI();
String tagName = $(element).tag();
ElementHandler<?> handler = handlers.get(new HandlerId(namespace, tagName));
if (handler != null)
{
Object o = handler.processElement(this, element);
return (T) o;
}
throw new ConfigurationException("No Handler registered for element named [" + tagName
+ "] in namespace: [" + namespace + "]");
}
代码示例来源:origin: stackoverflow.com
rte2.children();
for(Match rtetag : rte2.children().each()) {
if(rtetag.tag().equalsIgnoreCase("name")) {
rtetag.text();
if(rtetag.tag().equalsIgnoreCase("rtept")) {
for(Match rtepttag : rtetag.children().andSelf().each()) {
if(rtepttag.tag().equals("name")) {
point_name = rtepttag.text();
if(rtepttag.tag().equals("cmt")) {
point_cmt = rtepttag.text();
if(rtepttag.tag().equals("rtept")) {
if(last_lon == null) {
last_lon = point_lon;
代码示例来源:origin: windup/windup
/**
* Process the provided {@link Element} with the appropriate handler for it's namespace and tag name.
*/
@SuppressWarnings("unchecked")
public <T> T processElement(Element element) throws ConfigurationException
{
String namespace = $(element).namespaceURI();
String tagName = $(element).tag();
ElementHandler<?> handler = handlers.get(new HandlerId(namespace, tagName));
if (handler != null)
{
Object o = handler.processElement(this, element);
return (T) o;
}
throw new ConfigurationException("No Handler registered for element named [" + tagName
+ "] in namespace: [" + namespace + "]");
}
代码示例来源:origin: org.jboss.windup.rules/rules-impl
String tagName = $(parsedDocument).tag();
resource.setRootTagName(tagName);
代码示例来源:origin: windup/windup
switch ($(child).tag())
代码示例来源:origin: org.jboss.windup.rules.apps/rules-xml
String tagName = $(parsedDocument).tag();
xmlResourceModel.setRootTagName(tagName);
代码示例来源:origin: org.jboss.windup.config/windup-config-xml
switch ($(child).tag())
代码示例来源:origin: windup/windup
String tagName = $(parsedDocument).tag();
xmlResourceModel.setRootTagName(tagName);
代码示例来源:origin: org.jboss.windup.addon/config-impl
@Override
public Void processElement(ParserContext context, Element element)
{
ConfigurationRuleBuilderCustom rule = context.getBuilder().addRule();
List<Element> children = $(element).children().get();
for (Element child : children)
{
Object result = context.processElement(child);
switch ($(child).tag())
{
case "when":
rule.when(((Condition) result));
break;
case "perform":
ConfigurationRuleBuilderPerform perform = rule.perform(((Operation) result));
context.setRuleBuilder(perform);
break;
case "otherwise":
rule.perform(((Operation) result));
break;
case "where":
break;
}
}
return null;
}
代码示例来源:origin: org.jboss.windup.config/windup-config-xml
for (Element child : children)
switch ($(child).tag())
代码示例来源:origin: windup/windup
for (Element child : children)
switch ($(child).tag())
代码示例来源:origin: org.jboss.windup.config/windup-config-xml
switch ($(child).tag())
代码示例来源:origin: windup/windup
switch ($(child).tag())
内容来源于网络,如有侵权,请联系作者删除!