You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/01/27 09:58:00 UTC

[jira] [Closed] (GROOVY-5360) XmlParser and XmlSlurper strip whitespace text by default

     [ https://issues.apache.org/jira/browse/GROOVY-5360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King closed GROOVY-5360.
-----------------------------
      Assignee: Paul King
    Resolution: Won't Fix

I propose not changing this default for the current XmlParser and XmlSlurper. We plan to look into merging those for 4.0 and we can look at the appropriate default for trimming whitespace at that time.

> XmlParser and XmlSlurper strip whitespace text by default
> ---------------------------------------------------------
>
>                 Key: GROOVY-5360
>                 URL: https://issues.apache.org/jira/browse/GROOVY-5360
>             Project: Groovy
>          Issue Type: Bug
>          Components: XML Processing
>    Affects Versions: 2.0-beta-2
>            Reporter: Dr. Russel Winder
>            Assignee: Paul King
>            Priority: Major
>
> Currently both XmlParser and XmlSlurper elide text that is only whitespace. Surely it is for the application and not the parser to determine what to do with whitespace that is not inside an opening or closing tag. Both classes allow for changing the behaviour programatically. I argue that the current default in not consistent with generally expected behaviour and so should be changed. Clearly this is a breaking change and so should not happen in the 1.8.x series. The 2.0.x series should take the opportunity to make this change. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)