redundent / kotlin-xml-builder

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

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

Closed redundent closed 2 years ago

redundent commented 2 years ago

refs: #49

asm0dey commented 2 years 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 2 years 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 2 years 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