Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di asch
    Registrato dal
    Aug 2002
    Messaggi
    365

    Aiuto per Semplice errore di lettura RSS con ASP

    Ciao,
    Ho questo url rss che a volte fa funzioare il codice qui sotto e a volte no; dipende se nel file 20.xlm richiamato è presente la variabile description.
    Quando non c'è mi da errore.

    Come posso fare?

    codice:
    <%
    url="http://www.welt.de/export/xml/rss-091/20.xml"
    
    Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0") 
    objXML.async = false 
    objXML.setProperty "ServerHTTPRequest", True 
    
    ' validazione del documento XML
    objXML.validateOnParse =false' true 
    
    ' non conservare spazi 
    objXML.preserveWhiteSpace = false 
    
    blnLoaded = objXML.Load(url) 
    If Not blnLoaded Then 
    html = "Nessuna news da visualizzare" 
    Else
    
    Set objNodeList = objXML.getElementsByTagName("item") 
    
    For Each objNode In objNodeList 
    For Each objNode2 In objNode.childNodes
    		
    		Select Case objNode2.nodeName 
    		Case "title" 
    		strTitle = objNode2.firstChild.nodevalue 
    		Case "description"
    		strDescription = objNode2.firstChild.nodevalue 
    		End Select
    	Next
    
    	html = html + strTitle + strDescription + "
    "
    	strTitle = "" 
    	strDescription = "" 
    
    Next
    
    
    set objNodeList = Nothing 
    End if
    %>
    <%Response.write (html)%>
    ...............
    :::::ILNY::::::
    °°°°°°°°°°°°°°°

  2. #2
    che errore da quando non c'è description?

  3. #3
    Utente di HTML.it L'avatar di asch
    Registrato dal
    Aug 2002
    Messaggi
    365
    ecco:

    Microsoft VBScript runtime error '800a01a8'

    Object required: '[object]'

    ----------------------

    LINK: www.bassanonline.it/test.asp

    RSS: www.welt.de/export/xml/rss-091/20.xml
    ...............
    :::::ILNY::::::
    °°°°°°°°°°°°°°°

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.