Closed hoijui closed 1 year ago
There is also tidy, which is written in C. It seems quite large, powerful and complex, and I was not able to make it behave properly (for example, it produces different output if you run it once on a file, or twice).
gsvg even changes the actual content of the file, so my SVGs look different after applying it.
Yes and no. The XML writer provided by this library does not have enough control for this, and I don't think files that pretty are needed.
However, you can use the XML reader and use its events to print parsed XML data any way you want.
Hello! :-) I would like to make a tiny tool, that reformats XML in a specific format, well suited for diffing/storing it in git and the like. We currently need this especially for SVG, but I guess doing it for XML in general would not hurt either. The question is, whether this library is suited for such a task, with the main issue being fine-grained control over the output formatting, I imagine.
A little sample output:
The exact details may vary, but more or less, something like the above seems to make sense.
I am not yet a rust dev, but am looking for a somewhat simple project to start. So if you have some sample code that does something similar already, I would be happy about that too.