antchfx / htmlquery

htmlquery is golang XPath package for HTML query.
https://github.com/antchfx/xpath
MIT License
739 stars 74 forks source link

childnode get data from parents #5

Closed blaudev closed 5 years ago

blaudev commented 5 years ago

n := htmlquery.FindOne(doc, "//h1") t := htmlquery.InnerText(n)

t and n.FirstChild.Data gets data from all parent nodes

doc source: https://www.vivavisos.com.ar/alquileres-vacacionales/monte-hermoso/departamento-monoambiente-en-faro-recalada-356/192256448

blaudev commented 5 years ago

Sorry, is a issue on golang.org/x/net/html