i am trying html Parse method from "html"* package but can't find element 
"img" ...*

*Any ideas?*

var f func(*html.Node)

    f = func(n *html.Node) {

        if n.Type == html.ElementNode { //&& n.Data == "alt" {

            for _, a := range n.Attr {

                //if a.Key == "img" {

                fmt.Printf("a.key=%s a.val=%s\n", a.Key, a.Val)

                break

                //}

            }

        }

        for c := n.FirstChild; c != nil; c = c.NextSibling {

            f(c)

        }

    }

    f(doc)

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to