스크립팅 : XML 파일의 태그에서 값을 추출하는 가장 쉬운 방법은 무엇입니까?
pom.xml (Maven의 'Project Object Model')을 읽고 버전 정보를 추출하고 싶습니다. 예를 들면 다음과 같습니다. <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany</groupId> <artifactId>project-parent</artifactId> <name>project-parent</name> <version>1.0.74-SNAPSHOT</version> <dependencies> <dependency> <groupId>com.sybase.jconnect</groupId> <artifactId>jconnect</artifactId> <version>6.05-26023</version> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>1.5.2</version> </dependency> <dependency> <groupId>com.sun.jdmk</groupId> <artifactId>jmxtools</artifactId> <version>1.2.1</version> </dependency> <dependency> <groupId>org.easymock</groupId> <artifactId>easymock</artifactId> <version>2.4</version> </dependency> </dependencies> </project> 위에서 …