Groovy: copy XML elements from one doc to another
问题 I am new to Groovy and am stuck with a simple problem. All I wanna do is extract certain elements from one XML file and created a new file with it. Here's an example XML, let's use a Maven pom file: <project> <modelVersion>4.0.0</modelVersion> <groupId>com.group</groupId> <artifactId>artifact</artifactId> <version>1.4</version> <dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency> <