Closed TWiStErRob closed 5 years ago
Hmm, that's a tricky one since the xml parser sees it as 2 separate CData elements but with prettyPrint
on, it throws in an extra line break.
I think this should be fixable. I'll mess around with it a bit tomorrow
I got your test working but the code is ugly and I don't really like how I had to do it.
The parsing part of the library was added a more of a convenience function to handle fairly simple xml documents. I'm tempted to file this one under "won't fix."
Is parsing nested CDATA elements blocking you from fully using the library?
no, I'm not parsing nested CDATA for now feel free to wontfix. I was only outputting XML code that may already contain CDATA for XSLT transformation.
In the meantime I'm actually moving away from your library because I need streaming XML output (large amounts of data can't fit into StringBuilder
).
Re #13: it turns out that the standard Java 8 XMLStreamWriter
doesn't handle writeCData("<![CDATA[...]]>")
either.
This PR is what I meant in https://github.com/redundent/kotlin-xml-builder/pull/12#issuecomment-463862604, but don't know how to implement it. Feel free to close this if you don't want to do this.