org.apache.sling.commons.html

## Interface HtmlElement

All Known Implementing Classes:
  Comment, DocType, EndOfFile, EndTag, StartTag, TextData

    @ProviderType
    public interface HtmlElement

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default <T> T` `accept(Visitor<T> visitor)` Accepts a Visitor to visit
`default boolean` `containsAttribute(String attrName)`
`Map<String,AttrValue>` `getAttributes()`
`default String` `getAttributeValue(String name)`
`HtmlElementType` `getType()` Retrieve the associated ElementType
`String` `getValue()` The String value that best represents what this element is.
`default boolean` `getVoidTag()` Whether this element contains Attributes
`default boolean` `hasAttributes()`
`default void` `setAttribute(String name, String value)`
`boolean` `supportsAttributes()` Must be defined as true to allow default methods to work correctly, this method and the getAttributes method are used together to implement attribute support in an element.

### Method Detail

#### getType

    HtmlElementType getType()

Retrieve the associated ElementType

Returns:
  element type

#### supportsAttributes

    boolean supportsAttributes()

Must be defined as true to allow default methods to work correctly, this method and the getAttributes method are used together to implement attribute support in an element.

Returns:
  true if Element supports attributes

#### getAttributes

    Map<String,AttrValue> getAttributes()

#### getValue

    String getValue()

The String value that best represents what this element is.

Returns:

#### accept

    default <T> T accept(Visitor<T> visitor)

Accepts a Visitor to visit

Parameters:
  `visitor` -
Returns:

#### getVoidTag

    default boolean getVoidTag()

Whether this element contains Attributes

Returns:

#### hasAttributes

    default boolean hasAttributes()

#### containsAttribute

    default boolean containsAttribute(String attrName)

#### getAttributeValue

    default String getAttributeValue(String name)

#### setAttribute

    default void setAttribute(String name,
                              String value)