### isStartElement Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-reader-base/index.html Is the current element a start tag. ```APIDOC ## isStartElement ### Description Is the current element a start tag. ### Method open fun isStartElement(): Boolean ### Response - **Boolean** - True if the current event is a start element, false otherwise. ``` -------------------------------- ### fun XmlWriter.smartStartTag(qName: QName) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/smart-start-tag.html Writes a start tag for the given QName, attempting to reuse existing namespace prefixes. ```APIDOC ## fun XmlWriter.smartStartTag(qName: QName) ### Description Enhanced function for writing start tags, that will attempt to reuse prefixes. ### Method Function ### Signature `fun XmlWriter.smartStartTag(qName: QName)` ### Parameters - **qName** (QName) - The qualified name of the element to write. ``` -------------------------------- ### startLocationInfo Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-reader-base/index.html Gets location info for the start of the currently active event. ```APIDOC ## Property: startLocationInfo ### Signature `open override val startLocationInfo: XmlReader.LocationInfo?` ### Description Location info for the start of the currently "active" event, rather than the end of it. If not explicitly supported will return null. ``` -------------------------------- ### smartStartTag(qName: QName, body: XmlWriter.() -> Unit) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.core/-kt-xml-writer/index.html Enhanced function for writing start tags with a body. ```APIDOC ## smartStartTag(qName: QName, body: XmlWriter.() -> Unit) ### Description Enhanced function for writing start tags that attempts to reuse prefixes, with a body that writes the element content. ### Parameters - **qName** (QName) - The qualified name of the element. - **body** (XmlWriter.() -> Unit) - The body to execute for the element. ``` -------------------------------- ### startTag Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-writer/index.html Write a start tag. This increases the current depth. ```APIDOC ## startTag ### Description Write a start tag. This increases the current depth. ### Method Function ### Signature `open override fun startTag(namespace: String?, localName: String, prefix: String?)` ### Parameters - **namespace** (String?) - Required - The namespace URI. - **localName** (String) - Required - The local name of the tag. - **prefix** (String?) - Required - The prefix to use. ``` -------------------------------- ### fun XmlWriter.smartStartTag(nsUri: String?, localName: String, prefix: String? = null): String Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/smart-start-tag.html Writes a start tag with the given namespace, local name, and optional prefix hint, returning the actually used prefix. ```APIDOC ## fun XmlWriter.smartStartTag(nsUri: String?, localName: String, prefix: String? = null): String ### Description 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. ### Method Function ### Signature `@JvmOverloads @IgnorableReturnValue fun XmlWriter.smartStartTag(nsUri: String?, localName: String, prefix: String? = null): String` ### Parameters - **nsUri** (String?) - The namespace to use. - **localName** (String) - The local name to use. - **prefix** (String?) - A hint (if not `null`) for the prefix to use. Optional, defaults to `null`. ### Return - **String** - The actually used prefix. ``` -------------------------------- ### startTag(namespace: String?, localName: String, prefix: String?) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-dom-writer/start-tag.html Writes a start tag with the specified namespace, local name, and prefix. This increases the current depth. ```APIDOC ## startTag(namespace: String?, localName: String, prefix: String?) ### Description Writes a start tag with the specified namespace, local name, and prefix. This increases the current depth. ### Parameters - **namespace** (String?) - The namespace to use for the tag. - **localName** (String) - The local name for the tag. - **prefix** (String?) - The prefix to use, or `null` for the namespace to be assigned automatically. ``` -------------------------------- ### startDocument(version, encoding, standalone) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-writer/start-document.html Starts the document, generating an XML declaration with the specified version, encoding, and standalone status. ```APIDOC ## startDocument(version, encoding, standalone) ### Description Starts the document, generating an XML declaration with the specified version, encoding, and standalone status. ### Method startDocument ### Parameters - **version** (String?) - Optional - The XML version. - **encoding** (String?) - Optional - The encoding of the document. - **standalone** (Boolean?) - Optional - A statement that the document is standalone (no externally defined entities...). ``` -------------------------------- ### startLocationInfo Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-reader-base/start-location-info.html Gets the location info for the start of the currently active XML reader event. If explicitly supported, returns the location info; otherwise returns null. ```APIDOC ## Property startLocationInfo ### Description Location info for the start of the currently "active" event, rather than the end of it. If not explicitly supported will return null. ### Signature `open override val startLocationInfo: XmlReader.LocationInfo?` ``` -------------------------------- ### startTag(namespace: String?, localName: String, prefix: String?) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.core/-kt-xml-writer/index.html Writes a start tag to the XML output. ```APIDOC ## startTag(namespace: String?, localName: String, prefix: String?) ### Description Writes a start tag to the XML output. ### Parameters - **namespace** (String?) - The namespace URI of the element, or null. - **localName** (String) - The local name of the element. - **prefix** (String?) - The prefix of the element, or null. ``` -------------------------------- ### isStarted Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-reader-base/index.html Determines whether parsing has started. ```APIDOC ## Property: isStarted ### Signature `open override val isStarted: Boolean` ### Description Determine whether parsing has started yet. When this is `false` it is invalid to check the state. ``` -------------------------------- ### startTag Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-dom-writer/index.html Writes a start tag for an XML element. ```APIDOC ## startTag(namespace: String?, localName: String, prefix: String?) Writes a start tag for an XML element with the provided namespace, local name, and prefix. ``` -------------------------------- ### inline fun XmlWriter.smartStartTag(qName: QName, body: XmlWriter.() -> Unit) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/smart-start-tag.html Writes a start tag for the given QName and executes the provided body, automatically writing the end tag. ```APIDOC ## inline fun XmlWriter.smartStartTag(qName: QName, body: XmlWriter.() -> Unit) ### Description Enhanced function for writing start tags, that will attempt to reuse prefixes. The body is executed within the writer context and the end tag is automatically written. ### Method Function ### Signature `inline fun XmlWriter.smartStartTag(qName: QName, body: XmlWriter.() -> Unit)` ### Parameters - **qName** (QName) - The qualified name of the element to write. - **body** (XmlWriter.() -> Unit) - The content to write inside the element. ``` -------------------------------- ### smartStartTag Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-writer/index.html 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. ```APIDOC ## smartStartTag ### Description 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. ### Method Function ### Signature `inline fun XmlWriter.smartStartTag(nsUri: String?, localName: String, prefix: String? = null, body: XmlWriter.() -> Unit)` ### Parameters - **nsUri** (String?) - Required - The namespace URI. - **localName** (String) - Required - The local name of the tag. - **prefix** (String?) - Optional - The prefix to use, default null. - **body** (XmlWriter.() -> Unit) - Required - A lambda that writes the content of the tag. ### Notes - Annotated with `@JvmOverloads`. ``` -------------------------------- ### startTag(namespace: String?, localName: String, prefix: String?) Source: https://pdvrieze.github.io/xmlutil/coreJdk/nl.adaptivity.xmlutil.jdk/-st-a-x-writer/start-tag.html Starts a new XML element tag with the specified namespace, local name, and prefix. This method is part of the StAX writer interface and is called directly by users to write the opening tag of an XML element. ```APIDOC ## startTag(namespace: String?, localName: String, prefix: String?) ### Description Starts a new XML element tag with the specified namespace, local name, and prefix. This method is part of the StAX writer interface and is called directly by users to write the opening tag of an XML element. ### Method startTag ### Signature `open override fun startTag(namespace: String?, localName: String, prefix: String?)` ### Parameters - **namespace** (String?) - Optional - The namespace URI of the element, or null if no namespace. - **localName** (String) - Required - The local name of the element. - **prefix** (String?) - Optional - The namespace prefix, or null if no prefix. ### Usage Call this method to write the start tag of an XML element. The method is part of the StAX writer API and is intended for direct invocation by users writing XML content. ``` -------------------------------- ### allText Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/index.html Gets the next text sequence in the reader. Skips over comments and ignorable whitespace at the start, but throws an exception when encountering a tag. ```APIDOC ## allText ### Description Get the next text sequence in the reader. This will skip over comments and ignorable whitespace (starting the content), but not tags. Any tags encountered will cause an exception to be thrown. It can either be invoked when in a start tag to return all text content, or on a content element to include it (if text or cdata) and all subsequent siblings. ### Signature `fun XmlReader.allText(): String` ### Returns String` - The text sequence. ``` -------------------------------- ### startDocument Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-dom-writer/index.html Initializes the XML document. ```APIDOC ## startDocument(version: String?, encoding: String?, standalone: Boolean?) Starts the document and generates an XML declaration with the specified version, encoding, and standalone status. ``` -------------------------------- ### consecutiveTextContent Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/index.html Consumes all text and non-content (comments/processing instructions) to get an uninterrupted text sequence. Skips over comments and ignorable whitespace at the start, but returns upon encountering a tag. ```APIDOC ## consecutiveTextContent ### Description Consume all text and non-content (comment/processing instruction) to get an uninterrupted text sequence. This will skip over comments and ignorable whitespace that starts the string, but not tags. Any tags encountered will lead to a return of this function. Any tags encountered with cause an exception to be thrown. It can either be invoked when in a start tag to return all text content, or on a content element to include it (if text or cdata) and all subsequent siblings. ### Signature `fun XmlBufferedReader.consecutiveTextContent(): String` ### Returns String` - The uninterrupted text content. ``` -------------------------------- ### allConsecutiveTextContent Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/index.html Consumes all text and non-content (comments/processing instructions) to get an uninterrupted text sequence. Skips over comments but does not skip ignorable whitespace that starts the string, and will return when encountering a tag. ```APIDOC ## allConsecutiveTextContent ### Description Consume all text and non-content (comment/processing instruction) to get an uninterrupted text sequence. This will skip over comments but _not_ ignorable whitespace that starts the string, but not tags. Any tags encountered will lead to a return of this function. Any tags encountered with cause an exception to be thrown. It can either be invoked when in a start tag to return all text content, or on a content element to include it (if text or cdata) and all subsequent siblings. ### Function Signature `fun XmlPeekingReader.allConsecutiveTextContent(): String` ### Returns String - The uninterrupted text sequence. ``` -------------------------------- ### QName(namespaceURI: String, localPart: String, prefix: String) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-q-name/index.html Creates a new QName with the given namespace URI, local part, and prefix. ```APIDOC ## Constructor QName(namespaceURI, localPart, prefix) ### Description Create a new QName with the given namespace uri, local part and prefix. ### Parameters - `namespaceURI` (String) - The namespace URI. - `localPart` (String) - The local part. - `prefix` (String) - The prefix. ``` -------------------------------- ### fun XmlBufferedReader.consecutiveTextContent(): String Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/consecutive-text-content.html Consumes all text and non-content (comments/processing instructions) to get an uninterrupted text sequence. Skips over comments and ignorable whitespace at the start, but not tags. Throws XmlException on unexpected elements. ```APIDOC ## consecutiveTextContent ### Description Consumes all text and non-content (comment/processing instruction) nodes to get an uninterrupted text sequence. Skips over comments and ignorable whitespace that starts the string, but does not skip tags. Any tags encountered cause the function to return, or may cause an exception to be thrown. ### Function Signature ``` fun XmlBufferedReader.consecutiveTextContent(): String ``` ### Behavior - When invoked while at a start tag, catches all text content within the element. - When invoked on a content element (text or CDATA), includes that element and all subsequent siblings. - Skips comments and ignorable whitespace at the beginning. - Stops at the first tag encountered. - Moves to the containing end tag after consuming text. ### Return - **String** - The text found. ### Exceptions - **XmlException** - Thrown if reading breaks, or an unexpected element is found. ``` -------------------------------- ### fun XmlPeekingReader.allConsecutiveTextContent(): String Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/all-consecutive-text-content.html Consumes all text and non-content (comment/processing instruction) to get an uninterrupted text sequence. Skips over comments but not ignorable whitespace that starts the string, and not tags. Any tags encountered will cause an exception to be thrown. It can be invoked when in a start tag to return all text content, or on a content element to include it (if text or cdata) and all subsequent siblings. The function will move to the containing end tag. ```APIDOC ## fun XmlPeekingReader.allConsecutiveTextContent(): String ### Description Consume all text and non-content (comment/processing instruction) to get an uninterrupted text sequence. This will skip over comments but _not_ ignorable whitespace that starts the string, but not tags. Any tags encountered will lead to a return of this function. Any tags encountered with cause an exception to be thrown. It can either be invoked when in a start tag to return all text content, or on a content element to include it (if text or cdata) and all subsequent siblings. The function will move to the containing end tag. ### Method Function (extension) ### Signature `fun XmlPeekingReader.allConsecutiveTextContent(): String` ### Parameters None ### Return - **String** - The text found ### Throws - **XmlException** - If reading breaks, or an unexpected element was found. ``` -------------------------------- ### StartElementEvent(name, parentNamespaceContext, extLocationInfo) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-event/-start-element-event/-start-element-event.html Creates a StartElementEvent using a QName, parent namespace context, and optional extended location info. ```APIDOC ## Constructor: StartElementEvent(name, parentNamespaceContext, extLocationInfo) ### Description Creates a StartElementEvent using a QName, parent namespace context, and optional extended location info. ### Parameters - **name** (QName) - Required - The qualified name of the element. - **parentNamespaceContext** (IterableNamespaceContext) - Required - The namespace context of the parent element. - **extLocationInfo** (XmlReader.LocationInfo?) - Optional - Extended location information from the XML reader. Default is null. ``` -------------------------------- ### START_DOCUMENT Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-event-type/-s-t-a-r-t_-d-o-c-u-m-e-n-t/index.html Event representing the start of a document. This event type provides properties and functions to handle document start events. ```APIDOC ## START_DOCUMENT ### Description Event representing the start of a document. ### Properties - **isIgnorable** (Boolean) - Can this event type be ignored without losing meaning. - **isTextElement** (Boolean) - Is this an event for elements that have text content. - **name** (String) - The name of the event type. - **ordinal** (Int) - The ordinal value of the event type. ### Functions #### createEvent ```kotlin abstract fun createEvent(reader: XmlReader): XmlEvent ``` Create an XmlEvent corresponding to the event type. The parameters are taken from the reader. The reader is expected to just have read the event with this type. #### writeEvent ```kotlin open fun writeEvent(writer: XmlWriter, textEvent: XmlEvent.TextEvent) ``` Shortcut to allow writing text events (only for text event types). The reader is expected to just have read the event with this type. ```kotlin abstract fun writeEvent(writer: XmlWriter, reader: XmlReader) ``` Read the rest of the event from the reader and write it to the writer. The reader is expected to just have read the event with this type. ``` -------------------------------- ### reset Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffer-reader/index.html Resets the reader to the start. ```APIDOC ## reset ### Description Resets the reader to the start. ### Method fun reset() ``` -------------------------------- ### StartElementEvent(extLocationInfo, namespaceUri, localName, prefix, attributes, parentNamespaceContext, namespaceDecls) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-event/-start-element-event/-start-element-event.html Creates a StartElementEvent with extended location info, element name components, attributes, parent namespace context, and namespace declarations. ```APIDOC ## Constructor: StartElementEvent(extLocationInfo, namespaceUri, localName, prefix, attributes, parentNamespaceContext, namespaceDecls) ### Description Creates a StartElementEvent with extended location info, element name components, attributes, parent namespace context, and namespace declarations. ### Parameters - **extLocationInfo** (XmlReader.LocationInfo?) - Required - Extended location information from the XML reader. - **namespaceUri** (String) - Required - The namespace URI of the element. - **localName** (String) - Required - The local name of the element. - **prefix** (String) - Required - The namespace prefix of the element. - **attributes** (Array) - Required - The attributes of the element. - **parentNamespaceContext** (IterableNamespaceContext) - Required - The namespace context of the parent element. - **namespaceDecls** (List) - Required - The namespace declarations for this element. ``` -------------------------------- ### getFeature Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.dom2/-processing-instruction/index.html Gets a feature of this node. ```APIDOC ## getFeature ### Description Gets a feature of this node. ### Method getFeature ### Signature @ExperimentalXmlUtilApi open override fun getFeature(feature: String?, version: String?): Any? ### Parameters - **feature** (String?) - Required - The feature name. - **version** (String?) - Required - The version. ### Returns Any? - The feature value, or null if not supported. ``` -------------------------------- ### StartElementEvent(locationInfo, namespaceUri, localName, prefix, attributes, parentNamespaceContext, namespaceDecls) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-event/-start-element-event/-start-element-event.html Creates a StartElementEvent with a string location info, element name components, attributes, parent namespace context, and namespace declarations. ```APIDOC ## Constructor: StartElementEvent(locationInfo, namespaceUri, localName, prefix, attributes, parentNamespaceContext, namespaceDecls) ### Description Creates a StartElementEvent with a string location info, element name components, attributes, parent namespace context, and namespace declarations. ### Parameters - **locationInfo** (String) - Required - Location information as a string. - **namespaceUri** (String) - Required - The namespace URI of the element. - **localName** (String) - Required - The local name of the element. - **prefix** (String) - Required - The namespace prefix of the element. - **attributes** (Array) - Required - The attributes of the element. - **parentNamespaceContext** (IterableNamespaceContext) - Required - The namespace context of the parent element. - **namespaceDecls** (List) - Required - The namespace declarations for this element. ``` -------------------------------- ### nextTag Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffer-reader/index.html Get the next tag. ```APIDOC ## nextTag ### Description Get the next tag. This must call next, not use the underlying stream. ### Method @IgnorableReturnValue open fun nextTag(): EventType ### Parameters None ### Returns EventType - The next tag event type. ``` -------------------------------- ### BuilderCompat.build() Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-default-xml-serialization-policy/-builder-compat/index.html Builds and returns a DefaultXmlSerializationPolicy with the configured settings. ```APIDOC ## BuilderCompat.build() ### Description Builds and returns a DefaultXmlSerializationPolicy with the configured settings. ### Method build ### Signature open fun build(): DefaultXmlSerializationPolicy ### Returns - **DefaultXmlSerializationPolicy** - The built policy. ``` -------------------------------- ### CompactFragment(namespaces: Iterable, content: String) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.util/-compact-fragment/index.html Constructor with namespaces and content as a string. ```APIDOC ## Constructor: CompactFragment(namespaces: Iterable, content: String) ### Description Constructor with namespaces and content as a string. ### Parameters - **namespaces** (Iterable) - The namespaces to include. - **content** (String) - The content as a string. ``` -------------------------------- ### typeQName Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/index.html Gets the QName for a type descriptor. ```APIDOC ## Function: typeQName ### Description Gets the QName for a type descriptor. ### Signature `fun XmlSerializationPolicy.typeQName(xmlDescriptor: SafeXmlDescriptor): QName` ### Parameters - **xmlDescriptor** (SafeXmlDescriptor) - Required - The XML descriptor. ### Return Type `QName` ``` -------------------------------- ### fast(configure: B.() -> Unit = {}) Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-x-m-l/-xml-companion/fast.html Creates an XML instance with fast serialization, allowing configuration through a builder lambda. ```APIDOC ## fast(configure: B.() -> Unit = {}) ### Description Creates an XML instance with fast serialization, allowing configuration through a builder lambda. ### Method Function ### Signature `inline fun fast(configure: B.() -> Unit = {}): XML` ### Parameters - **configure** (B.() -> Unit) - Optional - A lambda to configure the XML builder. ### Returns - **XML** - The configured XML instance. ``` -------------------------------- ### eventType Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-reader-base/index.html Gets the type of the current event. ```APIDOC ## Property: eventType ### Signature `open override val eventType: EventType` ### Description Get the type of the current event. ``` -------------------------------- ### QName(namespaceURI: String, localPart: String) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-q-name/index.html Creates a new QName with the given namespace URI and local part. The prefix is unspecified (empty). ```APIDOC ## Constructor QName(namespaceURI, localPart) ### Description Create a new QName with the given namespace URI and local part. The prefix is unspecified (empty). ### Parameters - `namespaceURI` (String) - The namespace URI. - `localPart` (String) - The local part. ``` -------------------------------- ### toCName() Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-q-name/index.html Gets the CName part of a QName. ```APIDOC ## Function QName.toCName(): String ### Description Get the CName part of a QName. ### Returns - String - The CName string. ``` -------------------------------- ### QName(localPart: String) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-q-name/index.html Creates a new QName in the default namespace with the given local name and null prefix. ```APIDOC ## Constructor QName(localPart) ### Description Create a new QName in the default namespace with the given local name and null prefix. ### Parameters - `localPart` (String) - The local part. ``` -------------------------------- ### fast(serializersModule: SerializersModule, configure: B.() -> Unit = {}) Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-x-m-l/-xml-companion/fast.html Creates an XML instance with fast serialization, using a provided SerializersModule and optional configuration lambda. ```APIDOC ## fast(serializersModule: SerializersModule, configure: B.() -> Unit = {}) ### Description Creates an XML instance with fast serialization, using a provided SerializersModule and optional configuration lambda. ### Method Function ### Signature `inline fun fast(serializersModule: SerializersModule, configure: B.() -> Unit = {}): XML` ### Parameters - **serializersModule** (SerializersModule) - Required - The serializers module to use. - **configure** (B.() -> Unit) - Optional - A lambda to configure the XML builder. ### Returns - **XML** - The configured XML instance. ``` -------------------------------- ### getPlatformDefaultModule Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/index.html Gets the platform default serializers module. ```APIDOC ## Function: getPlatformDefaultModule ### Description Gets the platform default serializers module. ### Signatures - `expect fun getPlatformDefaultModule(): SerializersModule` - `actual fun getPlatformDefaultModule(): SerializersModule` ### Annotations - `@ExperimentalXmlUtilApi` ### Return Type `SerializersModule` ``` -------------------------------- ### nextTag Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-delegating-reader/index.html Get the next tag event type. ```APIDOC ## nextTag ### Description Overridden such that it will be valid, even when overriding next. ### Method @IgnorableReturnValue open override fun nextTag(): EventType ### Parameters None ### Returns EventType - The next tag event type. ``` -------------------------------- ### fun getPrefix(namespaceURI: String): String? Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-namespace-context/index.html Returns a prefix for a given namespace URI. If there are multiple candidates, the returned prefix is implementation defined. ```APIDOC ## fun getPrefix(namespaceURI: String): String? ### Description Returns a prefix for a given namespace URI. If there are multiple candidates, the returned prefix is implementation defined. ### Method Abstract function ### Parameters - **namespaceURI** (String) - Required - The namespace URI to look up. ### Returns - **String?** - A prefix, or null if not found. ``` -------------------------------- ### fast() Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-x-m-l/-xml-companion/fast.html Creates an XML instance with fast serialization using default settings. ```APIDOC ## fast() ### Description Creates an XML instance with fast serialization using default settings. ### Method Function ### Signature `open fun fast(): XML` ### Returns - **XML** - The configured XML instance. ``` -------------------------------- ### getNamespacePrefix Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-delegating-reader/index.html Get a prefix for the given namespace URI. ```APIDOC ## getNamespacePrefix ### Description Get a prefix for the given namespace URI, or `null` if there is none. ### Method open override fun getNamespacePrefix(namespaceUri: String): String? ### Parameters - **namespaceUri** (String) - Required - The namespace URI. ### Returns String? - The prefix for the namespace, or null if none. ``` -------------------------------- ### getAttributeValue Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-delegating-reader/index.html Get the value of an attribute by index or by name. ```APIDOC ## getAttributeValue ### Description Get the value of the attribute at the given index, or with the given name if it exists. ### Method open override fun getAttributeValue(index: Int): String open override fun getAttributeValue(name: QName): String? open override fun getAttributeValue(nsUri: String?, localName: String): String? ### Parameters - **index** (Int) - Required - The index of the attribute. - **name** (QName) - Required - The qualified name of the attribute. - **nsUri** (String?) - Required - The namespace URI of the attribute. - **localName** (String) - Required - The local name of the attribute. ### Returns String? - The value of the attribute, or null if it does not exist. ``` -------------------------------- ### version Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-reader-base/index.html Gets the declared xml version for the document. ```APIDOC ## Property: version ### Signature `open override val version: String?` ### Description The declared xml version for the document. Unlike general parsing, this value is accessible after reading the document element. The document element must be the first non-whitespace element. The value for this property before document element presence is known is implementation defined (and may change). ``` -------------------------------- ### text Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-reader-base/index.html Gets the text content for textual events. ```APIDOC ## Property: text ### Signature `open override val text: String` ### Description Get the text content for textual events. ``` -------------------------------- ### constructor(locationInfo: String, namespaceUri: String, localName: String, prefix: String) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-event/-named-event/-named-event.html Creates a NamedEvent with a string location, namespace URI, local name, and prefix. ```APIDOC ## constructor(locationInfo: String, namespaceUri: String, localName: String, prefix: String) ### Description Creates a NamedEvent with the specified location string, namespace URI, local name, and prefix. ### Parameters - **locationInfo** (String) - Required - The location information of the event. - **namespaceUri** (String) - Required - The namespace URI of the event. - **localName** (String) - Required - The local name of the event. - **prefix** (String) - Required - The prefix of the event. ``` -------------------------------- ### standalone Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-reader-base/index.html Gets the declared standalone status for the document. ```APIDOC ## Property: standalone ### Signature `open override val standalone: Boolean?` ### Description The declared standalone status for the document. Unlike general parsing, this value is accessible after reading the document element. The document element must be the first non-whitespace element. The value for this property before document element presence is known is implementation defined (and may change). ``` -------------------------------- ### StartElementEvent Constructors Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-event/-start-element-event/index.html Constructors for creating StartElementEvent instances with different parameter combinations. ```APIDOC ## StartElementEvent Constructors ### Description Creates a StartElementEvent with the specified location info, namespace URI, local name, prefix, attributes, parent namespace context, and namespace declarations. ### Constructors #### constructor(extLocationInfo: XmlReader.LocationInfo?, namespaceUri: String, localName: String, prefix: String, attributes: Array, parentNamespaceContext: IterableNamespaceContext, namespaceDecls: List) #### constructor(locationInfo: String, namespaceUri: String, localName: String, prefix: String, attributes: Array, parentNamespaceContext: IterableNamespaceContext, namespaceDecls: List) #### constructor(name: QName, parentNamespaceContext: IterableNamespaceContext, extLocationInfo: XmlReader.LocationInfo? = null) #### constructor(namespaceUri: String, localName: String, prefix: String, parentNamespaceContext: IterableNamespaceContext) ### Parameters - **extLocationInfo** (XmlReader.LocationInfo?) - Optional - Extended location information. - **locationInfo** (String) - Required - Location information as a string. - **namespaceUri** (String) - Required - The namespace URI of the element. - **localName** (String) - Required - The local name of the element. - **prefix** (String) - Required - The namespace prefix of the element. - **attributes** (Array) - Required - The attributes of the element. - **parentNamespaceContext** (IterableNamespaceContext) - Required - The parent namespace context. - **namespaceDecls** (List) - Required - The namespace declarations. - **name** (QName) - Required - The qualified name of the element. ``` -------------------------------- ### attributeCount Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffer-reader/attribute-count.html Gets the amount of attributes on the current element. ```APIDOC ## attributeCount ### Description Gets the amount of attributes on the current element. ### Property `open override val attributeCount: Int` ### Type Int ### Remarks This property is open and overridden. ``` -------------------------------- ### namespaceURI Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-namespace/namespace-u-r-i.html Gets the URI bound to the prefix of this namespace. ```APIDOC ## namespaceURI ### Description Gets the URI bound to the prefix of this namespace. ### Property `abstract val namespaceURI: String` ### Type String ### Remarks This is an abstract property, so implementers must provide the actual URI value. ``` -------------------------------- ### BuilderCompat constructor(policy: DefaultXmlSerializationPolicy) Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-default-xml-serialization-policy/-builder-compat/index.html Constructor that takes an existing DefaultXmlSerializationPolicy to initialize the builder. ```APIDOC ## BuilderCompat constructor(policy: DefaultXmlSerializationPolicy) ### Description Constructor that takes an existing DefaultXmlSerializationPolicy to initialize the builder. ### Method constructor ### Signature constructor(policy: DefaultXmlSerializationPolicy) ### Parameters - **policy** (DefaultXmlSerializationPolicy) - The policy to initialize the builder with. ``` -------------------------------- ### CompactFragment(namespaces: Iterable, content: CharArray?) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.util/-compact-fragment/index.html Constructor with namespaces and content as a character array. ```APIDOC ## Constructor: CompactFragment(namespaces: Iterable, content: CharArray?) ### Description Constructor with namespaces and content as a character array. ### Parameters - **namespaces** (Iterable) - The namespaces to include. - **content** (CharArray?) - The content as a character array, or null. ``` -------------------------------- ### readSimpleElement Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffer-reader/index.html From a start tag read the text only content of the element. ```APIDOC ## readSimpleElement ### Description From a start tag read the text only content of the element. Comments are allowed and handled, but subtags are not allowed. This tag finishes at the end of the element. ### Method fun XmlReader.readSimpleElement(): String ### Parameters None ### Returns String - The text content of the element. ``` -------------------------------- ### constructor(buffer: List, initialContext: IterableNamespaceContext) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffer-reader/-xml-buffer-reader.html Creates an XmlBufferReader with an initial namespace context. ```APIDOC ## constructor(buffer: List, initialContext: IterableNamespaceContext) ### Description Creates an XmlBufferReader that reads from the provided list of XML events, using the given initial namespace context for namespace resolution. ### Parameters - **buffer** (List) - Required - The list of XML events to read. - **initialContext** (IterableNamespaceContext) - Required - The initial namespace context to use. ``` -------------------------------- ### inline fun XmlWriter.startTag(nsUri: String?, localName: String, prefix: String? = null, body: XmlWriter.() -> Unit) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/index.html Helper function for a tag that allows writing the body but closes the tag on completion. ```APIDOC ## inline fun XmlWriter.startTag(nsUri: String?, localName: String, prefix: String? = null, body: XmlWriter.() -> Unit) ### Description Helper function for a tag that allows writing the body but closes the tag on completion. ### Method FUNCTION ### Signature `inline fun XmlWriter.startTag(nsUri: String?, localName: String, prefix: String? = null, body: XmlWriter.() -> Unit)` ### Parameters - **nsUri** (String?) - The namespace URI of the element. - **localName** (String) - The local name of the element. - **prefix** (String?) - The preferred prefix (optional, default null). - **body** (XmlWriter.() -> Unit) - The body content to write inside the tag. ``` -------------------------------- ### delegateFormat Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-x-m-l/-xml-output/index.html A delegate method to get access to a format with the same configuration. ```APIDOC ## delegateFormat ### Description A delegate method to get access to a format with the same configuration. ### Method open fun delegateFormat(): XML ### Return XML - A format with the same configuration. ``` -------------------------------- ### getData (extension) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.dom2/-processing-instruction/index.html Extension function to get the data of a PlatformProcessingInstruction. ```APIDOC ## getData (extension) ### Description Extension function to get the data of a PlatformProcessingInstruction. ### Method getData ### Signature @ExperimentalXmlUtilApi expect fun PlatformProcessingInstruction.getData(): String ### Returns String - The data of the processing instruction. ### Platform Implementations - Common: expect fun PlatformProcessingInstruction.getData(): String - JS: actual fun PlatformProcessingInstruction.getData(): String - JVM: actual fun PlatformProcessingInstruction.getData(): String - nativeOrWasm: @ExperimentalXmlUtilApi actual fun PlatformProcessingInstruction.getData(): String ``` -------------------------------- ### fun NamespaceContext.asQName(name: String): QName Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-namespace-context/index.html Converts a prefixed element name (CNAME) to a QName. If there is no prefix, the default prefix is used. ```APIDOC ## fun NamespaceContext.asQName(name: String): QName ### Description Converts a prefixed element name (CNAME) to a QName. If there is no prefix, the default prefix is used. ### Method Extension function ### Parameters - **name** (String) - Required - The prefixed element name to convert. ### Returns - **QName** - The resulting QName. ``` -------------------------------- ### copy Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-x-m-l/index.html Creates a copy of the XML instance with a custom configuration. ```APIDOC ## copy ### Description Creates a copy of the XML instance with a custom configuration. ### Method copy ### Parameters - **serializersModule** (SerializersModule) - Optional - The serializers module to use. - **configure** (XmlConfig.CustomBuilder.() -> Unit) - Required - Configuration lambda for the XML settings. ### Returns - **XML** - A new XML instance with the applied configuration. ``` -------------------------------- ### xmlVersion Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.core/-kt-xml-writer/index.html Gets or sets the XML version used for generation. ```APIDOC ## xmlVersion ### Description The version of XML to generate. By default XML 1.1. ### Property `var xmlVersion: XmlVersion` ### Type - **XmlVersion** - The XML version to use (e.g., XML10, XML11). ``` -------------------------------- ### StartElementEvent(namespaceUri, localName, prefix, parentNamespaceContext) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-event/-start-element-event/-start-element-event.html Creates a StartElementEvent with element name components and parent namespace context, without attributes or namespace declarations. ```APIDOC ## Constructor: StartElementEvent(namespaceUri, localName, prefix, parentNamespaceContext) ### Description Creates a StartElementEvent with element name components and parent namespace context, without attributes or namespace declarations. ### Parameters - **namespaceUri** (String) - Required - The namespace URI of the element. - **localName** (String) - Required - The local name of the element. - **prefix** (String) - Required - The namespace prefix of the element. - **parentNamespaceContext** (IterableNamespaceContext) - Required - The namespace context of the parent element. ``` -------------------------------- ### indent Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.core/-kt-xml-writer/index.html Gets or sets the indentation level used for auto-indentation. ```APIDOC ## indent ### Description The indentation level to use for autoindenting the output. ### Property `open var indent: Int` ### Type - **Int** - The number of indentation levels to apply. ``` -------------------------------- ### setPrefix(prefix: String, namespaceUri: String) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-dom-writer/set-prefix.html Binds the specified prefix to the provided namespace URI for the current element. ```APIDOC ## setPrefix(prefix: String, namespaceUri: String) ### Description Binds the prefix to the given uri for this element. ### Signature `open override fun setPrefix(prefix: String, namespaceUri: String)` ### Parameters - **prefix** (String) - The prefix to bind. - **namespaceUri** (String) - The namespace URI to associate with the prefix. ``` -------------------------------- ### XmlReader.attributes Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/attributes.html Gets an array of all attributes in the current (startTag) event. ```APIDOC ## XmlReader.attributes ### Description Gets an array of all attributes in the current (startTag) event. ### Property `val XmlReader.attributes: Array` ### Returns - **Array** - An array of all attributes in the current startTag event. ``` -------------------------------- ### attributeIndices: IntRange (extension) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffered-reader/index.html Gets a range for the attributes in the reader. ```APIDOC ## attributeIndices: IntRange (extension) ### Description Gets a range for the attributes in the reader. ### Property - **attributeIndices** (IntRange) - The range of attribute indices. ``` -------------------------------- ### ActualNameInfo(serialName: String, annotatedName: QName) Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-xml-serialization-policy/-actual-name-info/index.html Constructor for creating an ActualNameInfo instance with the given serial name and annotated name. ```APIDOC ## ActualNameInfo(serialName: String, annotatedName: QName) ### Description Constructs an ActualNameInfo instance with the specified serial name and annotated name. ### Parameters - **serialName** (String) - The serial name used for XML serialization. - **annotatedName** (QName) - The annotated name as a QName. ### Properties - **annotatedName**: QName - The annotated name. - **serialName**: String - The serial name. ``` -------------------------------- ### BuilderCompat constructor(policy: XmlSerializationPolicy) Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-default-xml-serialization-policy/-builder-compat/index.html Constructor that takes an XmlSerializationPolicy to initialize the builder. ```APIDOC ## BuilderCompat constructor(policy: XmlSerializationPolicy) ### Description Constructor that takes an XmlSerializationPolicy to initialize the builder. ### Method constructor ### Signature constructor(policy: XmlSerializationPolicy) ### Parameters - **policy** (XmlSerializationPolicy) - The policy to initialize the builder with. ``` -------------------------------- ### getAttributeNamespace Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-buffer-reader/get-attribute-namespace.html Get the namespace URI for the attribute at the given index. ```APIDOC ## getAttributeNamespace(index: Int): String ### Description Get the namespace URI for the attribute at the given index. ### Method Function ### Signature `open override fun getAttributeNamespace(index: Int): String` ### Parameters - **index** (Int) - Required - The index of the attribute. ### Returns - **String** - The namespace URI for the attribute at the given index. ``` -------------------------------- ### serialize Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-q-name-serializer/index.html Serializes a QName as a struct of namespaceUri, localpart and prefix. ```APIDOC ## serialize ### Description Regular serialization as struct of namespaceUri, localpart and prefix. ### Function Signature `open override fun serialize(encoder: Encoder, value: QName)` ### Parameters - **encoder** (Encoder) - The encoder to serialize to. - **value** (QName) - The QName to serialize. ``` -------------------------------- ### isElement Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-xml-delegating-reader/index.html Check if the current event is a start element with the given name. ```APIDOC ## isElement ### Description Determine whether the current event of the XMLReader is an element with the given name. Note that this ignores the prefix of the name. ### Method fun XmlReader.isElement(elementname: QName): Boolean fun XmlReader.isElement(type: EventType, elementname: QName): Boolean @JvmOverloads fun XmlReader.isElement(elementNamespace: String?, elementName: String, elementPrefix: String? = null): Boolean fun XmlReader.isElement(type: EventType, elementNamespace: String?, elementName: String, elementPrefix: String? = null): Boolean ### Parameters - **elementname** (QName) - Required - The qualified name of the element. - **type** (EventType) - Required - The event type to check. - **elementNamespace** (String?) - Required - The namespace of the element. - **elementName** (String) - Required - The local name of the element. - **elementPrefix** (String?) - Optional - The prefix of the element (default: null). ### Returns Boolean - True if the current event is a start element with the given name, false otherwise. ``` -------------------------------- ### compact(serializersModule: SerializersModule = EmptySerializersModule()): XML Source: https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-x-m-l/-xml-companion/compact.html Creates a compact XML format instance. This is a shortcut for calling `recommended { compact() }` and is useful for quickly obtaining a compact XML serializer. ```APIDOC ## compact(serializersModule: SerializersModule = EmptySerializersModule()): XML ### Description Creates a compact XML format instance. This is a shortcut for calling `recommended { compact() }` and is useful for quickly obtaining a compact XML serializer. ### Method Function call ### Signature `open fun compact(serializersModule: SerializersModule = EmptySerializersModule()): XML` ### Parameters - **serializersModule** (SerializersModule) - Optional - The serializers module to use for custom serializers. Defaults to `EmptySerializersModule()`. ### Returns - **XML** - The created compact XML format instance. ### Usage Example ```kotlin val xml = XML.compact() ``` ``` -------------------------------- ### getNodeName (extension) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.dom2/-processing-instruction/index.html Extension function to get the node name of a PlatformProcessingInstruction. ```APIDOC ## getNodeName (extension) ### Description Extension function to get the node name of a PlatformProcessingInstruction. ### Method getNodeName ### Signature @ExperimentalXmlUtilApi expect fun PlatformProcessingInstruction.getNodeName(): String ### Returns String - The node name. ### Platform Implementations - Common: expect fun PlatformProcessingInstruction.getNodeName(): String - JS: actual fun PlatformProcessingInstruction.getNodeName(): String - JVM: actual fun PlatformProcessingInstruction.getNodeName(): String - nativeOrWasm: @ExperimentalXmlUtilApi actual fun PlatformProcessingInstruction.getNodeName(): String ``` -------------------------------- ### getData (PlatformCharacterData) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.dom2/-text/index.html Extension function to get data from a PlatformCharacterData object. ```APIDOC ## getData (PlatformCharacterData) ### Description Extension function to get data from a PlatformCharacterData object. ### Method getData ### Signature `@ExperimentalXmlUtilApi expect fun PlatformCharacterData.getData(): String` ### Returns String - The data. ``` -------------------------------- ### fun createElementNS(namespaceURI: String, qualifiedName: String): Element Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil.dom2/-document/create-element-n-s.html Creates and returns a new Element with the specified namespace URI and qualified name. ```APIDOC ## FUNC createElementNS ### Description Creates a new Element with the specified namespace URI and qualified name. ### Method Function ### Signature fun createElementNS(namespaceURI: String, qualifiedName: String): Element The function is abstract and overridden in multiple actual implementations. ### Parameters - **namespaceURI** (String) - Required - The namespace URI for the new element. - **qualifiedName** (String) - Required - The qualified name for the new element. ### Returns Element - The created element. ``` -------------------------------- ### @JvmOverloads inline fun XmlWriter.smartStartTag(nsUri: String?, localName: String, prefix: String? = null, body: XmlWriter.() -> Unit) Source: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/index.html Helper function for writing tags that automatically writes the end tag. Otherwise uses the version that does not take a body parameter. ```APIDOC ## @JvmOverloads inline fun XmlWriter.smartStartTag(nsUri: String?, localName: String, prefix: String? = null, body: XmlWriter.() -> Unit) ### Description Helper function for writing tags that automatically writes the end tag. Otherwise uses the version that does not take a body parameter. ### Method FUNCTION ### Signature `@JvmOverloads inline fun XmlWriter.smartStartTag(nsUri: String?, localName: String, prefix: String? = null, body: XmlWriter.() -> Unit)` ### Parameters - **nsUri** (String?) - The namespace URI of the element. - **localName** (String) - The local name of the element. - **prefix** (String?) - The preferred prefix (optional, default null). - **body** (XmlWriter.() -> Unit) - The body content to write inside the tag. ```