groovy
  1. groovy
  2. GROOVY-6683

XmlParser trims text by default

    Details

    • Number of attachments :
      0

      Description

      When parsing a node like:

      <node>  foo  </node>
      

      XmlParser returns 'foo' not ' foo ' when getting the text value. This autotrimming feature is markedly different from what most XML parsers do (and is easy to do after the fact by using the trim() method when needed). This issue swaps the default but this feature can still be turned back on with a trimWhitespace flag if desired.

        Activity

        Hide
        Paul King added a comment -
        Show
        Paul King added a comment - Proposed solution: https://github.com/groovy/groovy-core/pull/375

          People

          • Assignee:
            Paul King
            Reporter:
            Paul King
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: