You can do this:
dom=parse(os.path.join(r, files))
ref=dom.getElementsByTagName('ulink')
for n in ref:
attr = n.getAttributeNode('xlink:title')
if attr:
link = attr.nodeValue.strip()
print link
It identifies all the elements by the name ulink
and get list of all such node. From that list, it looks for xlink:title
attribute and gets the value of this attribute and prints. Instead of print, you can have your if condition.