- requires = node.getAttribute("requires")
- if requires and not SystemInfo.get(requires, False):
- return
- item_text = node.getAttribute("text").encode("UTF-8")
- entryID = node.getAttribute("entryID") or "undefined"
- weight = node.getAttribute("weight") or 50
- for x in node.childNodes:
- if x.nodeType != xml.dom.minidom.Element.nodeType:
- continue
- elif x.tagName == 'screen':
- module = x.getAttribute("module") or None
- screen = x.getAttribute("screen") or None
+ requires = node.get("requires")
+ if requires:
+ if requires[0] == '!':
+ if SystemInfo.get(requires[1:], False):
+ return
+ elif not SystemInfo.get(requires, False):
+ return
+ item_text = node.get("text", "").encode("UTF-8")
+ entryID = node.get("entryID", "undefined")
+ weight = node.get("weight", 50)
+ for x in node:
+ if x.tag == 'screen':
+ module = x.get("module")
+ screen = x.get("screen")