Class XmlElement


public class XmlElement extends XmlNodeContainer
An element in an XmlTemplate whose name is an expression; holds attributes and child nodes.
  • Constructor Details

  • Method Details

    • getName

      public XmlExpression getName()
    • getAttributes

      public List<XmlAttribute> getAttributes()
    • attribute

      public XmlElement attribute(String name, String value)
      Adds an attribute whose name and value are expressions (quote literal text) and returns this element.
    • getElementDepth

      protected int getElementDepth()
      Description copied from class: XmlNode
      Returns how many elements enclose this node, including itself if it is an element; used for indentation.
      Overrides:
      getElementDepth in class XmlNode
    • writeStartImpl

      protected void writeStartImpl(ExpressionContext context, CodeWriter writer) throws Throwable
      Description copied from class: XmlNode
      Writes this node's opening output, such as an element's start tag or a text node's content.
      Specified by:
      writeStartImpl in class XmlNode
      Throws:
      Throwable
    • writeEndImpl

      protected void writeEndImpl(ExpressionContext context, CodeWriter writer) throws Throwable
      Description copied from class: XmlNode
      Writes this node's closing output, such as an element's end tag, after its children are written.
      Specified by:
      writeEndImpl in class XmlNode
      Throws:
      Throwable