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

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

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

Tag.getParent介绍

暂无

代码示例

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

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

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

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

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

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

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

/**
 * @see org.htmlparser.visitors.NodeVisitor#visitEndTag(org.htmlparser.Tag)
 */
@Override
public void visitEndTag(Tag tag) {
  m_appendBr = false;
  appendLinebreaks(tag, false);
  String attribute = m_attributeMap.remove(tag.getParent());
  if (attribute != null) {
    appendText(attribute);
  }
}

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

/**
 * @see org.htmlparser.visitors.NodeVisitor#visitEndTag(org.htmlparser.Tag)
 */
public void visitEndTag(Tag tag) {
  m_appendBr = false;
  appendLinebreaks(tag, false);
  String attribute = (String)m_attributeMap.remove(tag.getParent());
  if (attribute != null) {
    appendText(attribute);
  }
}

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

/**
 * @see org.htmlparser.visitors.NodeVisitor#visitEndTag(org.htmlparser.Tag)
 */
@Override
public void visitEndTag(Tag tag) {
  m_appendBr = false;
  appendLinebreaks(tag, false);
  String attribute = (String)m_attributeMap.remove(tag.getParent());
  if (attribute != null) {
    appendText(attribute);
  }
}

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

public void visitEndTag(Tag tag)
{
  Node parent;
  
  parent = tag.getParent ();
  // process only those nodes not processed by a parent
  if (null == parent)
    // an orphan end tag
    modifiedResult.append(tag.toHtml());
  else
    if (null == parent.getParent ())
      // a top level tag with no parents
      modifiedResult.append(parent.toHtml());
}

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

(tag.getParent() != null 
&& tag.getParent().isResource()))

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

public void visitTag(Tag tag)
{
  if (tag instanceof LinkTag)
    ((LinkTag)tag).setLink(linkPrefix + ((LinkTag)tag).getLink());
  else if (tag instanceof ImageTag)
    ((ImageTag)tag).setImageURL(linkPrefix + ((ImageTag)tag).getImageURL());
  // process only those nodes that won't be processed by an end tag,
  // nodes without parents or parents without an end tag, since
  // the complete processing of all children should happen before
  // we turn this node back into html text
  if (null == tag.getParent ()
    && (!(tag instanceof CompositeTag) || null == ((CompositeTag)tag).getEndTag ()))
    modifiedResult.append(tag.toHtml());
}

相关文章