Interface HtmlElement

    • 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
      • getValue

        String getValue()
        The String value that best represents what this element is.
        Returns:
      • accept

        default <T> T accept​(org.apache.sling.commons.html.util.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)