XmlContentBuilder
A dedicated builder for creating XML content. Wraps TextContentBuilder and provides XML-specific functionality.
Functions
Link copied to clipboard
Link copied to clipboard
Adds a processing instruction to the content.
Link copied to clipboard
Creates a self-closing XML tag with the given name and attributes.
Link copied to clipboard
fun tag(name: String, attributes: LinkedHashMap<String, String> = linkedMapOf(), block: XmlContentBuilder.() -> Unit = {})
Creates an XML tag with the given name, attributes, and content.
Link copied to clipboard
Link copied to clipboard
Extension function to add XML content to a TextContentBuilder.
Link copied to clipboard
fun xmlDeclaration(version: String = "1.0", encoding: String = "UTF-8", standalone: Boolean? = null)
Adds an XML declaration to the document.