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

Add a Utility Method for Converting GPathResults to XML

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-4
    • 1.7.2, 1.8-beta-1
    • XML Processing
    • None

    Description

      At the moment to output a GPathResult as XML you have to use the below syntax in StreamingMarkupBuilder:

      System.out << new StreamingMarkupBuilder().bind

      {xml -> xml.mkp.yield myNode}

      It is not clear what this is trying to achieve and to compound the problem the syntax differs between groovy scripts and classes. It would be better if there was a utility method to do this with a signature whose purpose is clear.

      Attachments

        Activity

          People

            paulk Paul King
            graemerocher Graeme Rocher
            Votes:
            4 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: