ファイルには次の行が含まれています。
<?xml version="1.0" encoding="UTF-8"?>
<FVDL xmlns="xmlns://www.fortifysoftware.com/schema/fvdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.9" xsi:type="FVDL">`
<CreatedTS date="2013-08-06" time="11:8:48" />`
FVDL でバージョン タグを読み取ろうとしています。lxml etree を使用しており、コード スニペットは
from lxml import etree
with open(os.path.join(analysis,"merged-results.fvdl") ,"r") as file_handle:
context = etree.parse(file_handle)
ver = context.xpath('//FVDL')
print ver
これは、標準の xml ファイルを解析する前に機能していました。ただし、上記のファイルでは失敗しています。(実行終了時の ver は空のリストです)