Skip to content

Question: How to serialise/parse large xml file with KorIO #1172

Answered by soywiz
multiport asked this question in Q&A
Discussion options

You must be logged in to vote

Supported since this PR: #1180

Example:

    @Test
    fun testNamedDescendantStreamInfinite() {
        val xml = Xml.Stream.parse(sequenceSyncStream {
            while (true) {
                yield("<xml>".toByteArray())
            }
        }.toCharReader(UTF8))
        assertEquals(
            """
                OpenTag(name=xml, attributes={})
                OpenTag(name=xml, attributes={})
                OpenTag(name=xml, attributes={})
                OpenTag(name=xml, attributes={})
                OpenTag(name=xml, attributes={})
                OpenTag(name=xml, attributes={})
                OpenTag(name=xml, attributes={})
                OpenTag(name=xml, attributes={})

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@soywiz
Comment options

Comment options

You must be logged in to vote
8 replies
@multiport
Comment options

@soywiz
Comment options

@multiport
Comment options

@soywiz
Comment options

@multiport
Comment options

Answer selected by soywiz
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 #1167 on December 27, 2022 14:59.