Class DomBuilderEx

java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.util.BuilderSupport
groovy.xml.DOMBuilder
org.implab.gradle.xslt.internal.DomBuilderEx
All Implemented Interfaces:
groovy.lang.GroovyObject

public class DomBuilderEx extends groovy.xml.DOMBuilder
DOMBuilder extended with fragment(Closure), text(Object) methods.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Standard constructor used to create a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    fragment(groovy.lang.Closure<?> closure)
    Creates a new document fragment.
    text(Object value)
    Creates a and alone text node.

    Methods inherited from class groovy.xml.DOMBuilder

    appendNamespaceAttributes, createDocument, createNode, createNode, createNode, createNode, newInstance, newInstance, parse, parse, parse, parseText, setParent

    Methods inherited from class groovy.util.BuilderSupport

    doInvokeMethod, getCurrent, getName, invokeMethod, invokeMethod, nodeCompleted, postNodeCompletion, setClosureDelegate, setCurrent

    Methods inherited from class groovy.lang.GroovyObjectSupport

    getMetaClass, setMetaClass

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface groovy.lang.GroovyObject

    getProperty, setProperty
  • Constructor Details

    • DomBuilderEx

      public DomBuilderEx(Document document)
      Standard constructor used to create a new instance. The parameter is passed to DOMBuilder.
  • Method Details

    • fragment

      public Object fragment(groovy.lang.Closure<?> closure)
      Creates a new document fragment. A document fragment is always detached from the main document. All nodes created in the specified closure are added to this fragment.
      Parameters:
      closure - The closure with inner structure of the fragment
      Returns:
      The created fragment
    • text

      public Object text(Object value)
      Creates a and alone text node. This method is useful to create a set of text nodes, similar to a list of string values.
      Parameters:
      value - A content of the text node. If the value is null then the empty text node will be created
      Returns:
      The created text node