org.htmlparser.Tag.getEndTag()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中org.htmlparser.Tag.getEndTag()方法的一些代码示例,展示了Tag.getEndTag()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.getEndTag()方法的具体详情如下:
包路径:org.htmlparser.Tag
类名称:Tag
方法名:getEndTag

Tag.getEndTag介绍

[英]Get the end tag for this (composite) tag. For a non-composite tag this always returns null.
[中]获取此(复合)标记的结束标记。对于非复合标记,它总是返回null

代码示例

代码示例来源:origin: com.github.tcnh/fitnesse

/**
 * Get closing node for this node, if any.
 * @param node Node to find closing sibling for
 * @return node or null
 */
public static Node endTag(Node node) {
 // No copying required since the node is not modified and has no children.
 return node instanceof Tag ? ((Tag) node).getEndTag() : null;
}

代码示例来源:origin: org.fitnesse/fitnesse

/**
 * Get closing node for this node, if any.
 * @param node Node to find closing sibling for
 * @return node or null
 */
public static Node endTag(Node node) {
 // No copying required since the node is not modified and has no children.
 return node instanceof Tag ? ((Tag) node).getEndTag() : null;
}

代码示例来源:origin: org.opencms/opencms-solr

/**
 * @see org.htmlparser.Tag#getEndTag()
 */
public Tag getEndTag() {
  return m_decorated.getEndTag();
}

代码示例来源:origin: org.opencms/opencms-core

/**
 * @see org.htmlparser.Tag#getEndTag()
 */
public Tag getEndTag() {
  return m_decorated.getEndTag();
}

代码示例来源:origin: com.bbossgroups.pdp/pdp-cms

/**
 * @see org.htmlparser.Tag#getEndTag()
 */
public Tag getEndTag() {
  return m_decorated.getEndTag();
}

代码示例来源:origin: org.htmlparser/htmlparser

/**
 * Finish off a tag.
 * Perhap add a virtual end tag.
 * Set the end tag parent as this tag.
 * Perform the semantic acton.
 * @param tag The tag to finish off.
 * @param lexer A lexer positioned at the end of the tag.
 */
protected void finishTag (Tag tag, Lexer lexer)
  throws
    ParserException
{
  if (null == tag.getEndTag ())
    tag.setEndTag (createVirtualEndTag (tag, lexer, lexer.getPage (), lexer.getCursor ().getPosition ()));
  tag.getEndTag ().setParent (tag);
  tag.doSemanticAction ();
}

代码示例来源:origin: com.bbossgroups/bboss-htmlparser

/**
 * Finish off a tag.
 * Perhap add a virtual end tag.
 * Set the end tag parent as this tag.
 * Perform the semantic acton.
 * @param tag The tag to finish off.
 * @param lexer A lexer positioned at the end of the tag.
 */
protected void finishTag (Tag tag, Lexer lexer)
  throws
    ParserException
{
  if (null == tag.getEndTag ())
    tag.setEndTag (createVirtualEndTag (tag, lexer, lexer.getPage (), lexer.getCursor ().getPosition ()));
  tag.getEndTag ().setParent (tag);
  tag.doSemanticAction ();
}

代码示例来源:origin: org.alfresco.surf/spring-webscripts

if (tag.getEndTag() != null && tag.getEndTag() != tag)
  buf.append(tag.getEndTag().toHtml());
if (tag.getEndTag() != null)
  buf.append(tag.getEndTag().toHtml());

代码示例来源:origin: deas/alfresco

if (tag.getEndTag() != null)
  buf.append(tag.getEndTag().toHtml());
  if (tag.getEndTag() != null)
    buf.append(tag.getEndTag().toHtml());

代码示例来源:origin: org.springframework.extensions.surf/spring-webscripts

if (tag.getEndTag() != null && tag.getEndTag() != tag)
  buf.append(tag.getEndTag().toHtml());
if (tag.getEndTag() != null)
  buf.append(tag.getEndTag().toHtml());

代码示例来源:origin: org.apache.uima/textmarker-core

public void visitTag(Tag tag) {
 String name = getName(tag);
 Type type = getType(name, cas);
 boolean tagClosed = isTagClosed(tag);
 boolean tagStillOpen = false;
 int begin = getBeginOffset(tag);
 int end = begin;
 if (tagClosed) {
  end = getEndOffset(tag);
 } else {
  Tag endTag = tag.getEndTag();
  if (endTag != null) {
   end = getEndOffset(endTag);
  } else {
   end = getEndOffset(tag);
   tagStillOpen = true;
  }
 }
 AnnotationFS annotation = cas.createAnnotation(type, begin, end);
 processAttributes(annotation, tag);
 Feature nameFeature = annotation.getType().getFeatureByBaseName("name");
 annotation.setStringValue(nameFeature, name);
 if (tagStillOpen) {
  annotationStack.add(annotation);
 } else {
  annotations.add(annotation);
 }
}

代码示例来源:origin: org.apache.uima/ruta-core

@Override
public void visitTag(Tag tag) {
 String name = getName(tag);
 Type type = getType(name, cas);
 boolean tagClosed = isTagClosed(tag);
 boolean tagStillOpen = false;
 int begin = getBeginOffset(tag);
 int end = begin;
 if (tagClosed) {
  end = getEndOffset(tag);
 } else {
  Tag endTag = tag.getEndTag();
  if (endTag != null) {
   end = getEndOffset(endTag);
  } else {
   end = getEndOffset(tag);
   tagStillOpen = true;
  }
 }
 AnnotationFS annotation = cas.createAnnotation(type, begin, end);
 processAttributes(annotation, tag);
 Feature nameFeature = annotation.getType().getFeatureByBaseName("name");
 annotation.setStringValue(nameFeature, name);
 if (tagStillOpen) {
  annotationStack.add(annotation);
 } else {
  annotations.add(annotation);
 }
}

代码示例来源:origin: com.bbossgroups/bboss-htmlparser

for (int i = 0; i < children.size (); i++)
    doSAX (children.elementAt (i));
end = tag.getEndTag ();
if (null != end)

代码示例来源:origin: org.htmlparser/htmlparser

for (int i = 0; i < children.size (); i++)
    doSAX (children.elementAt (i));
end = tag.getEndTag ();
if (null != end)

代码示例来源:origin: omegat-org/omegat

if (tag.getEndTag() != null) {
  recurse = false;

相关文章