Is there any way to get all the childrens node values within the ul tag.
Input:
- Industry
<
You can use XPath axis. An axis represents a relationship to the context node, and is used to locate nodes relative to that node on the tree. As of today there are 13 axes. You can use descendant
for all of the children (including nested) of the context node or descendant-or-self
axis which indicates the context node and all of its descendants. For example:
//ul/descendant::*/text()
//ul/descendant-or-self::*/text()
This will retrieve all text elements with a parent ul
element.
//ul/descendant::*/text()