Skip to content Skip to sidebar Skip to footer

Just Returning The Text Of Elements In Xpath (python / Lxml)

I have an XML structure like this: mytree = ''' 1 2

Solution 1:

You can use:

print info.xpath("/path/to/nodes/info/text()")

Post a Comment for "Just Returning The Text Of Elements In Xpath (python / Lxml)"