ChildNodes returns all the child nodes of the current node, including text, comments, and char data.
()
| 160 | // ChildNodes returns all the child nodes of the current node, |
| 161 | // including text, comments, and char data. |
| 162 | func (n *Node) ChildNodes() []*Node { |
| 163 | var list []*Node |
| 164 | for child := n.FirstChild; child != nil; child = child.NextSibling { |
| 165 | list = append(list, child) |
| 166 | } |
| 167 | return list |
| 168 | } |
| 169 | |
| 170 | func (n *Node) sanitizedData(preserveSpaces bool) string { |
| 171 | if preserveSpaces { |
no outgoing calls