|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cburch.editor.scanners.HtmlTag
public class HtmlTag
Represents the information contained within a tag in an HTML document.
| Method Summary | |
|---|---|
boolean |
containsAttribute(java.lang.String name)
Returns true if this tag mentions the requested
attribute. |
static HtmlTag |
create(java.lang.String text)
Generates a tag containing all the data encapsulated in the given HTML string. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the value associated with the attribute, or null
if the attribute was not mentioned or was mentioned with no
corresponding value (as in "<INPUT READONLY>"). |
java.lang.String |
getError()
Returns an error message explaining any problems with the HTML tag, or null if the HTML tag appears to
be valid. |
java.lang.String |
getName()
Returns the name within the tag, normalized to be in all capital letters. |
boolean |
isDeprecated()
Returns true if the HTML tag is deprecated in
HTML 4.01. |
boolean |
isEndTag()
Returns true if this tag ends its element. |
boolean |
isKnown()
Returns true if the HTML tag is defined in the
HTML 4.01 standard. |
boolean |
isStartTag()
Returns true if this tag starts its element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean isStartTag()
true if this tag starts its element.
true if the tag starts its element.public boolean isEndTag()
true if this tag ends its element.
It is possible for a tag to both start and end the element if
it uses the XML-like syntax "<TAG ... />".
true if this tag ends its element.public java.lang.String getName()
public boolean containsAttribute(java.lang.String name)
true if this tag mentions the requested
attribute.
name - the attribute name query.
true if the attribute is mentioned within
the tag.public java.lang.String getAttribute(java.lang.String name)
null
if the attribute was not mentioned or was mentioned with no
corresponding value (as in "<INPUT READONLY>").
name - the attribute name query.
null if no value is associated.public java.lang.String getError()
null if the HTML tag appears to
be valid.
null if it was successful.public boolean isDeprecated()
true if the HTML tag is deprecated in
HTML 4.01.
true if the tag is deprecated.public boolean isKnown()
true if the HTML tag is defined in the
HTML 4.01 standard.
true if the HTML tag is defined in the
HTML 4.01 standard.public static HtmlTag create(java.lang.String text)
text - a string of HTML, including the enclosing angle
brackets.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||