TreeBuilderContext

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun atPath(index1: Int, vararg indices: Int, init: TreeNodeContext<T>.() -> Unit)

Change current context to the path from the root node.

Link copied to clipboard
fun emptyNode(name: String)

Add a child with no attributes to the root

Link copied to clipboard
fun emptyNodes(names: List<String>): Int

Add empty nodes (nodes with no attributes) to current, Root context.

fun emptyNodes(name1: String, vararg names: String): Int

Add empty nodes (nodes with no attributes) to current Root context.

Link copied to clipboard
fun node(init: TreeNodeContext<T>.() -> Unit)

fun node(name: String, attributes: List<T> = emptyList(), init: TreeNodeContext<T>.() -> Unit = {})

Add a new child node to the root. Supports nested nodes.

Link copied to clipboard
fun root(init: RootNodeContext<T>.() -> Unit)
fun root(name: String, attributes: List<T> = emptyList())