Parser Atom Feed

I have a Atom feed like from Google calendar and try to parse it with XMLDocument but I fail terrific. Used a lot JSON but never XML and I’m new in Xojo/RB.

I would like to extract the titles, summaries, colors,… from all entries. Could write a primitive parser with InStr, etc. but that’s not the fine way. Can anybody help me?

[code]<?xml version='1.0' encoding='UTF-8'?>

http://www.google.com/calendar/feeds/default/allcalendars/full
2014-05-09T14:40:55.078Z

Cookie Monster’s Calendar List cookie.monster@mydomain.comcookie.monster@mydomain.com Google Calendar1

http://www.google.com/calendar/feeds/default/allcalendars/full/cookie.monster%40mydomain.com2014-05-09T14:40:55.044Z2014-05-09T06:19:44.000Zcookie.monster@mydomain.comcookie.monster@mydomain.comcookie.monster@mydomain.com<gCal:accesslevel value=‘owner’/><gCal:color value=’#2952A3’/><gCal:hidden value=‘false’/><gCal:selected value=‘true’/><gCal:timezone value=‘Europe/Zurich’/><gCal:timesCleaned value=‘0’/>

http://www.google.com/calendar/feeds/default/allcalendars/full/cookie.monster%40mydomain.com2014-05-09T14:40:55.052Z2014-05-09T10:11:29.000Zholiday

this is the summary for holidaycookie.monster@mydomain.comcookie.monster@mydomain.com<gCal:accesslevel value=‘owner’/><gCal:color value=’#AB8B00’/><gCal:hidden value=‘false’/><gCal:selected value=‘true’/><gCal:timezone value=‘Europe/Zurich’/><gCal:timesCleaned value=‘0’/>

[/code]

I would use RegEx expressions to get the information out of the feed.

Using the XML parser (I think) is the right way to do it. What was the failure?

Okay, figured it out how to read all titles (for example). I haven’t fully understood the notation. In the examples it has always many attributes with equal sign like: but I don’t have a attribute name, only the value like: James McGovern

So this code reads out the title from all entries (which in this case are calendar titles):

[code] Dim xml As New XmlDocument
Try
xml.LoadXml(kXml2)
Catch e As XmlException
MsgBox("XML error: " + e.Message)
End Try

// Display all the titles
Dim nodes As XmlNodeList
nodes = xml.XQL("//entry//title") // Find all nodes entry->title in XML

// Loop through results and display each title value
Dim node As XmlNode
For i As Integer = 0 To nodes.Length-1
node = nodes.Item(i)

MsgBox("//entry//title: " + node.FirstChild.Value)

Next[/code]