|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dbsystems.simplescrape.AbstractHTMLToken
de.dbsystems.simplescrape.HTMLTag
public class HTMLTag
Represents tags in HTML-files. There will be one object for every opening and closing tag, each (and for unary tags, too). Attributes are stored and parsed seperately and can be accessed through the getAttributes()-method.
Constructor Summary | |
---|---|
HTMLTag(java.lang.String tagContent)
Create an HTML tag. |
Method Summary | |
---|---|
boolean |
attributesMatch(HTMLTag a,
HTMLTag b,
ScrapeOptions options)
Test the attribute sets of two tags. |
HTMLTagAttributes |
getAttributes()
Returns the attributes of this node. |
java.lang.String |
getName()
Returns the name of this tag. |
boolean |
isEndTag()
Whether or not the tag is an end tag. |
boolean |
isUnaryTag()
Whether or not the tag is a unary tag. |
boolean |
match(AbstractHTMLToken other,
ScrapeOptions options)
Determines whether two tokens match. |
java.lang.String |
toString()
Returns an HTML-representation of this tag. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HTMLTag(java.lang.String tagContent)
Method Detail |
---|
public boolean attributesMatch(HTMLTag a, HTMLTag b, ScrapeOptions options)
a
- The tag under test.b
- The reference to be tested against.options
- Relevant options for this comparison are attributesStrict and ignoreCase.
true
: The attributes match, false
: they don't match.public boolean match(AbstractHTMLToken other, ScrapeOptions options)
AbstractHTMLToken
match
in class AbstractHTMLToken
other
- The search-HtmlToken to be tested against.options
- A set of options. Relevant options are attributesStrict, trimText and
ignoreCase.
public HTMLTagAttributes getAttributes()
public java.lang.String getName()
public boolean isEndTag()
public boolean isUnaryTag()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |