Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| HTML Parser Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.htmlparser.filters
Class TagNameFilter

    java.lang.Object
      org.htmlparser.filters.TagNameFilter

All Implemented Interfaces:
  NodeFilter

public class TagNameFilter
extends Object
implements NodeFilter

This class accepts all tags matching the tag name.

Field Summary
`protected String` | `mName` The tag name to match.

Constructor Summary
`TagNameFilter(String name)` Creates a new instance of TagNameFilter that accepts tags with the given name.

Method Summary
`boolean` | `accept(Node node)` Accept nodes that are tags and have a matching tag name.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### mName

    protected String mName

  The tag name to match.

Constructor Detail

### TagNameFilter

    public TagNameFilter(String name)

  Creates a new instance of TagNameFilter that accepts tags with the given name.

Parameters:
  `name` - The tag name to match.

Method Detail

### accept

    public boolean accept(Node node)

  Accept nodes that are tags and have a matching tag name. This discards non-tag nodes and end tags. The end tags are available on the enclosing non-end tag.

  Specified by:
    `accept` in interface `NodeFilter`
  Parameters:
    `node` - The node to check.
  Returns:
    `true` if the node is to be kept, `false` if it is to be discarded.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2004 Somik Raha Mar 14, 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

HTML Parser is an open source library released under LGPL.