Class Editor.NodeBuilder

java.lang.Object
eu.maveniverse.domtrip.Editor.NodeBuilder
Enclosing class:
Editor

public static class Editor.NodeBuilder extends Object
Fluent builder for creating and adding nodes to the document.

This builder provides a convenient way to add nodes to existing documents while maintaining the Editor's whitespace management and configuration.

  • Method Details

    • element

      public Editor.EditorElementBuilder element(String name) throws DomTripException
      Creates an element builder that will be added to the document.
      Parameters:
      name - the element name
      Returns:
      a new EditorElementBuilder for fluent element construction
      Throws:
      DomTripException
    • element

      public Editor.EditorElementBuilder element(QName qname) throws DomTripException
      Creates an element builder using a QName that will be added to the document.
      Parameters:
      qname - the element QName
      Returns:
      a new EditorElementBuilder for fluent element construction
      Throws:
      DomTripException
    • comment

      public Editor.EditorCommentBuilder comment()
      Creates a comment builder that will be added to the document.
      Returns:
      a new EditorCommentBuilder for fluent comment construction
    • text

      public Editor.EditorTextBuilder text()
      Creates a text builder that will be added to the document.
      Returns:
      a new EditorTextBuilder for fluent text construction