How do I find all child nodes within matched elements (including text nodes)?
2 answers
I'm not familiar with nokogiri, but are you trying to find all the children of any containing element <br/>
? If so, try:
//*[br]/node()
In any case, using text () will only match text nodes, not any marriage elements, which may or may not be what you want. If you only want text nodes then
//*[br]/text()
must do the trick.
0
source to share