|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Tag
Tag returned by TagTokenizer. Allows easy access to element name and attributes.
This interface supports read-only operations on the tag. To change a tag, create a new CustomTag.
| Nested Class Summary | |
|---|---|
static class |
Tag.Type
Type of tag. |
| Method Summary | |
|---|---|
int |
getAttributeCount()
Number of attributes in tag. |
int |
getAttributeIndex(String name,
boolean caseSensitive)
Determine which attribute has the specified name. |
String |
getAttributeName(int index)
Get name of attribute. |
String |
getAttributeValue(int index)
Get value of an attribute. |
String |
getAttributeValue(String name,
boolean caseSensitive)
Get value of an attribute. |
String |
getName()
Name of tag (ie. |
Tag.Type |
getType()
Type of tag (e.g. |
boolean |
hasAttribute(String name,
boolean caseSensitive)
Determine if an attribute is present. |
String |
toString()
Get the complete tag in its original form, preserving original formatting. |
void |
writeTo(Appendable out)
Write out the complete tag in its original form, preserving original formatting. |
| Method Detail |
|---|
void writeTo(Appendable out)
throws IOException
IOExceptionString getName()
Tag.Type getType()
Tag.Typeint getAttributeCount()
int getAttributeIndex(String name,
boolean caseSensitive)
String getAttributeName(int index)
String getAttributeValue(int index)
String getAttributeValue(String name,
boolean caseSensitive)
boolean hasAttribute(String name,
boolean caseSensitive)
String toString()
This has a slight overhead in that it needs to construct a String. For improved performance, use writeTo() instead.
toString in class ObjectwriteTo(Appendable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||