1 from xml.dom.minidom
import parse,parseString,getDOMImplementation,Node
11 nodelist=dom.getElementsByTagName(
'frontier-connect')[0].childNodes
14 if node.nodeType!=Node.TEXT_NODE
and node.nodeType!=Node.COMMENT_NODE:
17 for attrName
in attrs.keys():
18 attrNode=attrs.get(attrName)
19 attrValue=attrNode.nodeValue
24 valuelist.append((attrName,attrValue))
28 Parse an XML file by name
43 if __name__ ==
'__main__':
44 mydocstr=
"""<frontier-connect><proxy url="http://cmst0frontier.cern.ch:3128"/><proxy url="http://cmst0frontier.cern.ch:3128"/><proxy url="http://cmst0frontier1.cern.ch:3128"/><proxy url="http://cmst0frontier2.cern.ch:3128"/><server url="http://cmsfrontier.cern.ch:8000/FrontierInt"/><server url="http://cmsfrontier.cern.ch:8000/FrontierInt"/><server url="http://cmsfrontier1.cern.ch:8000/FrontierInt"/><server url="http://cmsfrontier2.cern.ch:8000/FrontierInt"/><server url="http://cmsfrontier3.cern.ch:8000/FrontierInt"/><server url="http://cmsfrontier4.cern.ch:8000/FrontierInt"/></frontier-connect>"""
46 p.parseString(mydocstr)
52 print p.parameterdict()
54 p.parse(
'/afs/cern.ch/user/x/xiezhen/w1/site-local-config.xml')
60 print p.parameterdict()
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...
__parameterDict
parse result
def handleFrontierConnect