Class SpinXmlAttribute

Direct Known Subclasses:
DomXmlAttribute

public abstract class SpinXmlAttribute extends SpinXmlNode<SpinXmlAttribute>
An attribute in a tree-oriented XML data format.
Author:
Sebastian Menski, Daniel Meyer
  • Constructor Details

    • SpinXmlAttribute

      public SpinXmlAttribute()
  • Method Details

    • value

      public abstract String value()
      Returns the value of the attribute as String.
      Returns:
      the string value of the attribute
    • value

      public abstract SpinXmlAttribute value(String value)
      Sets the value of the attribute.
      Parameters:
      value - the value to set
      Returns:
      the wrapped xml dom attribute
      Throws:
      SpinXmlNodeException - if the value is null
    • remove

      public abstract SpinXmlElement remove()
      Removes the attribute.
      Returns:
      the wrapped owner tree element
    • toString

      public abstract String toString()
      Returns the wrapped XML attribute value as string representation.
      Specified by:
      toString in class Spin<SpinXmlAttribute>
      Returns:
      the string representation
    • writeToWriter

      public abstract void writeToWriter(Writer writer)
      Writes the wrapped XML attribute value to an existing writer.
      Specified by:
      writeToWriter in class Spin<SpinXmlAttribute>
      Parameters:
      writer - the writer to write to