xml-rs icon indicating copy to clipboard operation
xml-rs copied to clipboard

Remove Indentation

Open Binero opened this issue 9 years ago • 2 comments

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?

Binero avatar Apr 21 '15 15:04 Binero

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.

netvl avatar Apr 21 '15 16:04 netvl

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.

xitep avatar Apr 21 '15 19:04 xitep