goquery icon indicating copy to clipboard operation
goquery copied to clipboard

`text` Non-html formats are filtered

Open wazidw opened this issue 6 years ago • 1 comments

For example, xml format can't use text()

<?xml version="1.0" encoding= "UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans">
xxxx
</beans>

The results:

xxxx

wazidw avatar Dec 10 '19 02:12 wazidw

Hello,

Goquery is an html parser (it uses the net/html html5 parser internally), it doesn't parse arbitrary xml. You can use the stdlib's xml package for that or I know there are some userland packages that support xpath and more specific xml features.

Martin

mna avatar Dec 10 '19 14:12 mna