redundent / kotlin-xml-builder

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

Adding Namespace class to allow for betting handling of namespaces. #50

Closed redundent closed 1 year ago

redundent commented 1 year ago

refs: #49

asm0dey commented 1 year ago

One small comment on implementation: when I'm creating a node with String.invoke() syntax I can't pass namespaces there cause attributes parameter accepts only pairs and should likely accept also something like Triple or Attribute

redundent commented 1 year ago

Fair point. I wanted to keep it simple with the existing Pair attribute logic but I can easily add another overload that will take in an object to allow more granular values.

asm0dey commented 1 year ago

My use case is creation of Atom feed. There are links with several attributes in different namespaces. Writing a block body looks a bit overwhelming for such a task. But generally the API works, thank you!

Testing version built by jitpack