python3.11-lxml/plans/etree-fromstring.py
Lukas Zachar 08aaaade59 Add tmt gating plan
Resolves: rhbz#2159317
2023-02-01 15:22:04 +01:00

8 lines
170 B
Python

import lxml.etree as et
s = '<foo><bar baz="xyzzy">a<![CDATA[b]]>c</bar></foo>'
x = et.fromstring(s)
t = x.find('bar').text
print(t)
if t != 'abc':
raise Exception()