redundent / kotlin-xml-builder

A lightweight type safe builder to build xml documents in Kotlin
Apache License 2.0
155 stars 18 forks source link

[Question] How can I add a `DOCTYPE` element? #47

Closed anskotid closed 2 years ago

anskotid commented 2 years ago

I need to do something like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DataSet SYSTEM "example.dtd">
<DataSet>
   ...
</DataSet>

I tried many different approaches but none worked.

Is there a way to achieve this?

redundent commented 2 years ago

I don't think there is a way to do this right now. I can look into adding it.

redundent commented 2 years ago

@anskotid Version 1.7.4 has been published that allows for this. Check the README for an example

anskotid commented 2 years ago

@anskotid Version 1.7.4 has been published that allows for this. Check the README for an example

Wow, you're a gem, thank you so much!