Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6070

concatenation with NodeChildren object fails

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: XML Processing
    • Labels:
      None
    • Environment:
      windows, linux

      Description

      When I run the attached script (slurperFail.groovy) I get the following output:

      class groovy.util.slurpersupport.NodeChildren
      471 U.S. 462
      http://laws.findlaw.com/us/471/462.html

      However, I believe that the citation (471 U.S. 462) should appear on the 3rd line as well. I have tried many variations (e.g. with toString()) but could not get it to concatenate the 2nd element.

      It's confusing also that "NodeChildren" is not available in the API docs, so I'm not sure what methods it has to offer, but if it would just concatenate the string I would be happy, i.e. if

      println( it.website +' '+it.citation )

      would work the way it looks like it should.

      Thanks,
      = miles =

        Attachments

        1. slurperFail.groovy
          0.4 kB
          miles zarathustra

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              mlzarathustra miles zarathustra
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: