Logo Search packages:      
Sourcecode: radiotray version File versions  Download package

testxpath.py

from lxml import etree
from lxml import objectify
from StringIO import StringIO



parser = etree.XMLParser(recover=True)
root = etree.parse("/home/carlos/downloads/listen.xspf",parser)
#root = etree.parse(StringIO('<playlist version="1" xmlns="http://xspf.org/ns/0/"><tracklist><track>aaaaa</track></tracklist></playlist>'),parser)
result = root.xpath('//xspf:track/xspf:location',namespaces={'xspf':'http://xspf.org/ns/0/'})
print result[0].text

Generated by  Doxygen 1.6.0   Back to index