Details

      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

        paulk@asert.com.au created issue -
        Paul King made changes -
        Field Original Value New Value
        Labels breaking
        Hide
        Paul King added a comment -
        Show
        Paul King added a comment - Proposed solution: https://github.com/groovy/groovy-core/pull/375
        Paul King made changes -
        Description When parsing a node like:
        {code}
        <node> foo </node>
        {code}
        {{XmlParser}} returns {{'foo'}} not {{' foo '}} when getting the text value. This autotrimming feature is markedly different from what most XML parsers do. This issue swaps the default but this feature can still be turned back on with a {{trimWhitespace}} flag.
        When parsing a node like:
        {code}
        <node> foo </node>
        {code}
        {{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.
        Paul King made changes -
        Description When parsing a node like:
        {code}
        <node> foo </node>
        {code}
        {{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.
        When parsing a node like:
        {code}
        <node> foo </node>
        {code}
        {{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.
        Paul King made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12735594 ] Default workflow, editable Closed status [ 12747336 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12967721 ] Default workflow, editable Closed status [ 12975466 ]
        Mark Thomas made changes -
        Reporter Paul King [ paulk@asert.com.au ] Paul King [ paulk ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        19m 5s 1 Paul King 09/Apr/14 05:34
        Resolved Resolved Closed Closed
        1d 12h 42m 1 Paul King 10/Apr/14 18:16

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development