| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Python does have built-in XML processing, so we can avoid regexps:
import xml.etree.ElementTree as ET
tree = ET.parse("pom.xml")
ns = {"maven": "http://maven.apache.org/POM/4.0.0"}
version = tree.getroot().find("maven:version", ns).text.strip()
print(version)
Sorry, something went wrong.
|
Thanks! I didn't know it! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes GH-611.