EDN Admin
Well-known member
Hello,
Im novice with XML and I trying to read the following ATOM feed: "http://www.agenciaminas.mg.gov.br/atom/"
I tried the following code that works for me with some RSS feeds but I getting an error.
Can someone help, please?
<pre class="prettyprint lang-vb Set objXML = CreateObject("Microsoft.XMLDOM")
objXML.async = False
objXML.Load("http://www.agenciaminas.mg.gov.br/atom/")
If objXML.parseError.errorCode <> 0 Then
WScript.Echo objXML.parseError.reason
Else
Set objLst = objXML.getElementsByTagName("entry")
intNoOfHeadlines = objLst.length -1
For i = 0 To (intNoOfHeadlines)
Set objHdl = objLst.item(i)
Ref = objHdl.childNodes(0).text
Link = objHdl.childNodes(1).text
Text = objHdl.childNodes(2).text
WScript.Echo Text & "" & Ref & ""
Set objHdl = Nothing
Next
Set objLst = Nothing
End If
Set objXML = Nothing[/code]
Thanks.
Ilanio
<br/>
<br/>
<br/>
View the full article
Im novice with XML and I trying to read the following ATOM feed: "http://www.agenciaminas.mg.gov.br/atom/"
I tried the following code that works for me with some RSS feeds but I getting an error.
Can someone help, please?
<pre class="prettyprint lang-vb Set objXML = CreateObject("Microsoft.XMLDOM")
objXML.async = False
objXML.Load("http://www.agenciaminas.mg.gov.br/atom/")
If objXML.parseError.errorCode <> 0 Then
WScript.Echo objXML.parseError.reason
Else
Set objLst = objXML.getElementsByTagName("entry")
intNoOfHeadlines = objLst.length -1
For i = 0 To (intNoOfHeadlines)
Set objHdl = objLst.item(i)
Ref = objHdl.childNodes(0).text
Link = objHdl.childNodes(1).text
Text = objHdl.childNodes(2).text
WScript.Echo Text & "" & Ref & ""
Set objHdl = Nothing
Next
Set objLst = Nothing
End If
Set objXML = Nothing[/code]
Thanks.
Ilanio
<br/>
<br/>
<br/>
View the full article