Skip to content

Instantly share code, notes, and snippets.

@ntkathole
Created October 13, 2019 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntkathole/14f88c09db6d16c63bddc345fd64f28e to your computer and use it in GitHub Desktop.
Save ntkathole/14f88c09db6d16c63bddc345fd64f28e to your computer and use it in GitHub Desktop.
import sys
import xml.etree.ElementTree as ET
tree = ET.parse(sys.argv[1])
root = tree.getroot()
root.findall('properties')
attrib1 = {'name': 'polarion-group-id', 'value': sys.argv[2]}
ET.SubElement(root.findall('properties')[0],'property',attrib1)
tree.write(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment