ianprime0509 / zig-xml

XML parser for Zig
http://ianjohnson.dev/zig-xml/
BSD Zero Clause License
17 stars 4 forks source link

XML writer #10

Open ianprime0509 opened 1 year ago

ianprime0509 commented 1 year ago

There should be some way to write XML content. There are several potential APIs that could be used here: perhaps the most "elegant" API would just be a write function which accepts a reader Event, but this may come with its own issues and needs to be thought through a bit more.

Desired features:

ianprime0509 commented 1 year ago

The "elegant" API of a single writeEvent function turns out to be terrible to use in certain cases, such as when writing the start of an element with attributes which may or may not be included based on runtime conditions. It can still exist, perhaps, but there should be another API which is more flexible with cases like this.