org.htmlcleaner.conditional
Class TagNodeEmptyContentCondition

java.lang.Object
  extended by org.htmlcleaner.conditional.TagNodeEmptyContentCondition
All Implemented Interfaces:
ITagNodeCondition

public class TagNodeEmptyContentCondition
extends Object
implements ITagNodeCondition

Checks if node is an inline 0r block element and has empty contents or white/non-breakable spaces only. Nodes that have non-empty id attribute are considered to be non-empty, since they can be used in javascript scenarios. Examples that should be pruned,

   
 
Examples of code that should NOT be pruned:
 

- no content but image tags do not have text content. hi - the first (empty) td is a placeholder so the second td is in the correct column

Author:
Konstantin Burov

Constructor Summary
TagNodeEmptyContentCondition(ITagInfoProvider provider)
           
 
Method Summary
 boolean satisfy(TagNode tagNode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagNodeEmptyContentCondition

public TagNodeEmptyContentCondition(ITagInfoProvider provider)
Method Detail

satisfy

public boolean satisfy(TagNode tagNode)
Specified by:
satisfy in interface ITagNodeCondition


Copyright © 2006-2014. All Rights Reserved.