blob: 2cf9c0af8e24e95471d680acb1c9a604ec49fa17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/python
#
# Copyright (c) 2018 Raptor Engineering, LLC
# Released under the terms of the AGPL v3
import sys
from xml.dom import minidom
xmldoc = minidom.parse(sys.argv[2])
recordlist = xmldoc.getElementsByTagName('keyword')
for r in recordlist:
if r.attributes['name'].value == sys.argv[1]:
datalist = r.getElementsByTagName('kwdata')
for d in datalist:
print d.childNodes[0].nodeValue
|