Class Attribute

  • All Implemented Interfaces:
    Node

    public class Attribute
    extends BasicNode
    This class represents an attribute of an Element
    Author:
    digulla
    See Also:
    Element
    • Constructor Detail

      • Attribute

        public Attribute​(Token token)
        Create an attribute from a Token.

        The token must include the space before the name and end with the closing quote.

        Parameters:
        token -
      • Attribute

        public Attribute​(String name,
                         String value)
        Create an attribute with a certain name and value.

        The quote to use is determined automatically depending on the content of the value

      • Attribute

        public Attribute​(String name,
                         String value,
                         Namespace namespace)
        Create an attribute with a certain name and value.

        The quote to use is determined automatically depending on the content of the value

      • Attribute

        public Attribute​(String name,
                         String value,
                         char quoteChar)
        Create an attribute with a certain name and value plus a preference for the quote character that should be used.

        If the quote character exists in the value, it is ignored.

      • Attribute

        public Attribute​(String name,
                         String value,
                         Namespace namespace,
                         char quoteChar)
        Create an attribute with a certain name and value plus a preference for the quote character that should be used.

        If the quote character exists in the value, it is ignored.