Skip to content

Instantly share code, notes, and snippets.

@torgeir
Created July 8, 2021 05:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torgeir/fdac864b145c6598cd5372f44460a956 to your computer and use it in GitHub Desktop.
Save torgeir/fdac864b145c6598cd5372f44460a956 to your computer and use it in GitHub Desktop.
Org w3c dom serializer xml node to string kotlin
// https://xerces.apache.org/xerces2-j/faq-dom.html
private val loadSaveSerializer by lazy {
val registry = DOMImplementationRegistry.newInstance()
val domImplementation = registry.getDOMImplementation("LS") as DOMImplementationLS
domImplementation.createLSSerializer()
}
loadSaveSerializer.writeToString(..)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment