smartStartTag

inline fun XmlWriter.smartStartTag(qName: QName, body: XmlWriter.() -> Unit)(source)

Enhanced function for writing start tags, that will attempt to reuse prefixes.


fun XmlWriter.smartStartTag(nsUri: String?, localName: String, prefix: String? = null): String(source)

Enhanced function for writing start tags, that will attempt to reuse prefixes. Rather than use the passed prefix it will look up the prefix for the given namespace, and if present use that. It will also ensure to write the appropriate namespace attribute if needed. If the namespace is the default/null, xml or the xmlns namespace the implementation will be as expected.

Return

The used prefix


inline fun XmlWriter.smartStartTag(nsUri: String?, localName: String, prefix: String? = null, body: XmlWriter.() -> Unit)(source)

Helper function for writing tags that will automatically write the end tag. Otherwise