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

Add clone or copy constructor to XML Node

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2, 2.1.0-beta-1
    • Component/s: None
    • Labels:
      None

      Description

      When retrieving an node from an XML there is no easy way to clone this node for further processing without changing the original XML.

      Currently I used a workaround:

      def clonedNode = new XmlParser().parseText( XmlUtil.serialize( xmlNode ) )
      

      It would be a lot easier if the Node object have a copy constructor or clone would be supported.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                paulk Paul King
                Reporter:
                mszalbach Marcel Szalbach
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: