// findAtom finds the first occurrence of an ElementNode matching the Atom.
findAtom finds the first occurrence of an ElementNode matching the Atom.
// findAtom finds the first occurrence of an ElementNode matching the Atom .
func findAtom(n *html.Node, a atom.Atom) *html.Node {
	for c := n.FirstChild; c != nil; c = c.NextSibling {
		if c.Type == html.ElementNode && (c.DataAtom == a || (c.DataAtom == 0 && strings.ToLower(c.Data) == a.String())) {
			return c
		}
		if m := findAtom(c, a); m != nil {
			return m
		}
	}
	return nil
}
func findAtom ( n * html . Node , a atom . Atom ) * html . Node { for c := n . FirstChild ; c != nil ; c = c . NextSibling { if c . Type == html . ElementNode && ( c . DataAtom == a || ( c . DataAtom == 0 && strings . ToLower ( c . Data ) == a . String ( ) ) ) { return c } if m := findAtom ( c , a ) ; m != nil { return m } } return nil }
findAtom finds the first occurrence of an ElementNode matching the Atom.
findAtom finds the first occurrence of an ElementNode matching the Atom .