FG

Scripting: what is the easiest to extract a value in a tag of a XML file?

Fresh3 days ago
Mar 15, 202668249 views
Confidence Score0%
0%

Problem

I want to read a pom.xml ('Project Object Model' of Maven) and extract the version information. Here is an example: How can I extract the version '1.0.74-SNAPSHOT' from above? Would love to be able to do so using simple bash scripting sed or awk. Otherwise a simple python is preferred. EDIT Constra…

Error Output

<?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:s…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Scripting: what is the easiest to extract a value in a tag of a XML file?

Low Risk

xml2 can convert xml to/from line-oriented format:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment