xml-rs
xml-rs copied to clipboard
Remove Indentation
It seems like the library doesn't remove XML-indentation.
<description summary="core global object">
The core global object. This is a special singleton object. It
is used for internal Wayland protocol features.
</description>
The characters event here seems to have the indentation in it. Is there a way to automatically have it be removed?
No, there is none. As far as I know, no streaming processing library does this, as it is very easy to get it wrong and not that simple. By default xml-rs does not trim leading and trailing whitespace, so the best approach for you would be removing indentation manually.
That said, I may consider adding such an option in the future, but it is not even in plans right now.
Personally, I think this is an application level issue. I agree that with @netvl that this is very easy to get wrong by a general purpose xml parsing library such as xml-rs.