A start tag always has a {@linkplain #getTagType() type} that is a subclass of {@link StartTagType}, meaning that any tag that does not start with the characters '</
' is categorised as a start tag.
This includes many tags which stand alone, without a {@linkplain StartTagType#getCorrespondingEndTagType() corresponding end tag}, and would not intuitively be categorised as a "start tag". For example, an HTML {@linkplain StartTagType#COMMENT comment} is represented as a single start tag that spans the whole comment,and does not have an end tag at all.
See the static fields defined in the {@link StartTagType} class for a list of the standard start tag types.
StartTag
instances are obtained using one of the following methods:
The methods above which accept a name
parameter are categorised as named search methods.
In such methods dealing with start tags, specifying an argument to the name
parameter that ends in a colon (:
) searches for all start tags in the specified XML namespace.
The constants defined in the {@link HTMLElementName} interface can be used directly as arguments to these name
parameters.For example, source.getAllStartTags(
{@link HTMLElementName#A})
is equivalent to source.getAllStartTags("a")
, and gets all hyperlink start tags.
The {@link Tag} superclass defines a method called {@link Tag#getName() getName()} to get the name of this start tag.
See also the XML 1.0 specification for start tags. @see Tag @see Element @see EndTag
|
|
|
|
|
|
|
|
|
|
|
|