For anyone who is interested in parsing a Picasa Album with Classic
ASP, this is what I did:

<%
rss_url= "http://picasaweb.google.com/etc..."; 'Place Album RSS Feed
here
Set xml = Server.CreateObject("msxml2.ServerXMLHTTP")

xml.open "GET", rss_url, False
xml.send

Set doc = Server.CreateObject("msxml2.DOMDocument")
doc.loadXML( xml.ResponseText )

Set items = doc.getElementsByTagName("item")
'Response.Write items.length & "<HR>" 'Debug

Dim curitem,fcount
fcount = 0
For inum = 0 To items.length-1
    Set curitem = items.item(inum)
    'title = getNodeText(curitem,"title")
    'description = getNodeText(curitem,"description")
    'thumbnail = getNodeText(curitem,"thumbnail")
    'enclosure = getNodeText(curitem,"enclosure")
    'Set enode = curitem.SelectSingleNode("enclosure")
    'enclosure = getNodeText(enode,"@url")
    Set group = curitem.SelectSingleNode("media:group")
    If group Is Nothing Then
        mdesc = "[no media:group]"
        mtitle = "[no media:group]"
        mthumbnail = "[no media:group]"
    Else
        mdesc  = getNodeText(group,"media:description")
        mtitle = getNodeText(group,"media:title")
     Set mcont = group.SelectSingleNode("media:content")
                mcontent = getNodeText(mcont,"@url")
         Set mthumb = group.SelectSingleNode("media:thumbnail")
                mthumbnail = getNodeText(mthumb,"@url")
    End If
%>
                                                <li>
                                                        <a class="thumb" 
href="<%=Replace(mthumbnail, "s72", "s512")%>"
title="Title #<%=fcount%>">
                                                                <img 
src="<%=mthumbnail%>" alt="Title #<%=fcount%>" />
                                                        </a>
                                                        <div class="caption">
                                                                <div 
class="image-title"></div>
                                                                <div 
class="image-desc"><%=mdesc%></div>
                                                        </div>
                                                </li>
<%
fcount = fcount + 1
Next 'Go through each link in the rss feed.

Function getNodeText(curnode,name)
    dim node
    Set node = curnode.SelectSingleNode(name)
    If node IS NOTHING Then getNodeText = "[no " & name & "]" Else
getNodeText = node.Text
End Function
%>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to