Trying to parse data.xspf
with Python 3.6.8
and LXML 4.4.1
following this and find <creator>Creator</creator>
element but have []
output.
data.xspf
<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" version="1">
<title/>
<creator/>
<trackList>
<track>
<location>http://localhost:8000</location>
<creator>Creator</creator>
<title>Title</title>
<annotation>Blah
Blah
Blah
Blah
Blah
Blah
Blah</annotation>
<info>info</info>
</track>
</trackList>
</playlist>
Script:
>>> from lxml import etree
>>> tree = etree.parse("data.xspf")
>>> tree.findall('.//creator')
Any idea?