Altova Mailing List Archives

Re: can't parse atom feeds

From: KrisB <krisdbjunkATgmailDOTcom>
Date: 9/6/2006 6:33:00 PM

Thanks for the quick response.  I used the code you sent, but I'm 
getting this error:

msxml4.dll error '80004005'

Property name is invalid.

which corresponds to this line: objXML.setProperty 
"SelectionNamespace","xmlns:at='" & RootNamespace & "'"

I'm using ASP (Vbscript), if that wasn't obvious.  When I write out the 
RootNamespace variable, I'm getting '', so its 
connecting to and reading the xml fine.  Anything obvious I'm missing?


Martin Honnen wrote:
> KrisB wrote:
>> I'm using MSXML2.DOMDOCUMENT object to parse remote xml files and I 
>> can parse them fine if they are rss feeds (channel/item), but atom 
>> feeds (feed/entry) will not parse and I'm using the same code.  Here 
>> is the code I'm using:
>>         rssURL = ""
>>         Set objXML = Server.CreateObject("MSXML2.DOMDOCUMENT.4.0")
>>         objXML.async = False
>>         objXML.validateOnParse = false
>>         objXML.resolveExternals = false
>>         objXML.preserveWhiteSpace = false
>>         objXML.setProperty "ServerHTTPRequest", True
>>         objXML.Load(rssURL)
> Well you should always check the return value of the load call if you 
> load synchronously as it indicates whether there was a parse error or 
> not. Then for XML with namespaces use XPath and 
> selectNodes/selectSingleNode to access nodes so use e.g.
>           If objXML.load(rssURL) Then
>             RootNamespace = objXML.documentElement.namespaceURI
>             If RootNamespace = "" Then
>               objXML.setProperty "SelectionNamespace"_
>                 "xmlns:at='" & RootNamespace & "'"
>               Set entries = objXML.selectNodes("//at:entry")
>               ' now access entries here
>             End If
>           Else
>             ' handle objXML.parseError.reason
>           End If


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.