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

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

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

Tag.setEndTag介绍

[英]Set the end tag for this (composite) tag. For a non-composite tag this is a no-op.
[中]设置此(复合)标记的结束标记。对于非复合标记,这是不可操作的。

代码示例

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

/**
 * @see org.htmlparser.Tag#setEndTag(org.htmlparser.Tag)
 */
public void setEndTag(Tag arg0) {
  m_decorated.setEndTag(arg0);
}

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

/**
 * @see org.htmlparser.Tag#setEndTag(org.htmlparser.Tag)
 */
public void setEndTag(Tag arg0) {
  m_decorated.setEndTag(arg0);
}

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

/**
 * @see org.htmlparser.Tag#setEndTag(org.htmlparser.Tag)
 */
public void setEndTag(Tag arg0) {
  m_decorated.setEndTag(arg0);
}

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

private static Tag newTag(Class<? extends Tag> klass) {
 Tag tag = null;
 try {
  tag = klass.newInstance();
  tag.setTagName(tag.getTagName().toLowerCase());
  Tag endTag = klass.newInstance();
  endTag.setTagName("/" + tag.getTagName().toLowerCase());
  endTag.setParent(tag);
  tag.setEndTag(endTag);
 } catch (Exception e) {
  LOG.log(Level.WARNING, "Unable to create tag from class " + klass, e);
 }
 return tag;
}

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

private static Tag newTag(Class<? extends Tag> klass) {
 Tag tag = null;
 try {
  tag = klass.newInstance();
  tag.setTagName(tag.getTagName().toLowerCase());
  Tag endTag = klass.newInstance();
  endTag.setTagName("/" + tag.getTagName().toLowerCase());
  endTag.setParent(tag);
  tag.setEndTag(endTag);
 } catch (Exception e) {
  LOG.log(Level.WARNING, "Unable to create tag from class " + klass, e);
 }
 return tag;
}

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

/**
 * Make flat clone of just this one node. No nesting
 *
 * @param node Node to clone
 * @return cloned version of node
 */
public static Node flatClone(Node node) {
 if (node == null) return null;
 Node newNode = cloneOnlyNode(node, null);
 newNode.setChildren(new NodeList());
 if (newNode instanceof Tag) {
  ((Tag) newNode).setEndTag(null);
 }
 return newNode;
}

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

/**
 * Make flat clone of just this one node. No nesting
 *
 * @param node Node to clone
 * @return cloned version of node
 */
public static Node flatClone(Node node) {
 if (node == null) return null;
 Node newNode = cloneOnlyNode(node, null);
 newNode.setChildren(new NodeList());
 if (newNode instanceof Tag) {
  ((Tag) newNode).setEndTag(null);
 }
 return newNode;
}

代码示例来源: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

lexer.getPage (), position, position, vector);
tag.setEndTag ((Tag)node);
if (null != content)

代码示例来源: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: com.bbossgroups/bboss-htmlparser

lexer.getPage (), position, position, vector);
tag.setEndTag ((Tag)node);
if (null != content)

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

lexer.getPage (), position, position, vector);
tag.setEndTag ((Tag)node);
if (null != content)

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

lexer.getPage (), position, position, vector);
tag.setEndTag ((Tag)node);
if (null != content)

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

lexer.getPage (), position, position, vector);
tag.setEndTag ((Tag)node);
if (null != content)

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

ret.setEndTag (ret);
else
  do
          ret.setEndTag (next);
          node = null;
                  next.setEndTag (next);
                  finishTag (next, lexer);
                  addChild (ret, next);

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

ret.setEndTag (ret);
else
  do
          ret.setEndTag (next);
          node = null;
                  next.setEndTag (next);
                  finishTag (next, lexer);
                  addChild (ret, next);

相关文章