|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectau.id.jericho.lib.html.Segment
au.id.jericho.lib.html.Attribute
Represents a single attribute
name/value segment within a StartTag
.
The methods in this class provide read-only access to a single attribute in the source document.
The AttributesOutputSegment
class provides a means to add, delete or modify attributes and
their values for inclusion in an OutputDocument
.
Created using the Attributes.get(String key)
method.
See also the XML 1.0 specification for attributes.
Attributes
Method Summary | |
java.lang.String |
getDebugInfo()
Returns a string representation of this object useful for debugging purposes. |
java.lang.String |
getKey()
Name of the attribute in lower case. |
java.lang.String |
getName()
Returns the name of the attribute in original case. |
Segment |
getNameSegment()
Segment spanning the Name of the attribute. |
char |
getQuoteChar()
Returns the character used to quote the value. |
java.lang.String |
getValue()
Returns the decoded value of the attribute. |
Segment |
getValueSegment()
Segment spanning the Value of the attribute. |
Segment |
getValueSegmentIncludingQuotes()
Segment spanning the value of the attribute, including quotation marks if any. |
boolean |
hasValue()
Indicates whether the attribute has a value. |
Methods inherited from class au.id.jericho.lib.html.Segment |
charAt, compareTo, encloses, encloses, equals, findAllCharacterReferences, findAllComments, findAllElements, findAllElements, findAllStartTags, findAllStartTags, findAllStartTags, findFormControls, findFormFields, findWords, getBegin, getEnd, getSourceText, getSourceTextNoWhitespace, hashCode, ignoreWhenParsing, isComment, isWhiteSpace, length, parseAttributes, subSequence, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public java.lang.String getKey()
Note that this package treats all attribute names as case in-sensitive, contrary to the XHTML specification.
public Segment getNameSegment()
public Segment getValueSegment()
public Segment getValueSegmentIncludingQuotes()
If the value is not enclosed by quotation marks, this is the same as the value segment
public char getQuoteChar()
This will be either a double-quote (") or a single-quote (').
public java.lang.String getName()
public java.lang.String getValue()
Note that before version 1.5 this method returned the raw value of the attribute, without decoding.
null
if the attribute has no value.public boolean hasValue()
true
if the attribute has a value, otherwise false
.public java.lang.String getDebugInfo()
Segment
getDebugInfo
in class Segment
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |