Skip to content

How to read a DOM Document from XML? #165

Closed Answered by pdvrieze
StefanOltmann asked this question in Q&A
Discussion options

You must be logged in to vote

To do this you can use something like:

   val writer = DomWriter()
   val reader = XmlStreaming.newReader(inputStream) // or KtXmlReader(InputStreamReader(inputStream))
   do {
     val event = reader.next()
     reader.writeCurrent(writer) // from nl.adaptivity.xmlutil.writeCurrent
    } while (event != EventType.END_DOCUMENT)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by StefanOltmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #163 on June 29, 2023 15:56.