<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[creazione di rss]]></title><description><![CDATA[<p dir="auto">salve<br />
ho creato sulla base di un articolo letto uno script che legge alcuni record di un db li estrare e crea una pagine rss (anche se ha l'estensione asp)</p>
<p dir="auto">essendone più di due i db su cui effettuare la ricerca, ho riprodotto il codice per ogni db o tabella<br />
mi da l'errore di non chiusura dei tag &lt;rss&gt; e &lt;channel&gt;<br />
probabilmente per via del ciclo "end if" ecc nella situazione in cui in un db non ho notizie dell'ultima settimana</p>
<p dir="auto">credo quindi che l'errore sia nel secondo blocco di codice</p>
<pre><code>      &lt;%
'Stringa di connessione al nostro Data Base di news
'da modificare in base al percorso del vostro Data Base
StrConnessione = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &amp; _
      server.MapPath("../db/") &amp; "\db1.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConnessione
 
'Istruzione SQL che prende le news dal Data Base;
'da cambiare con il nome della vostra tabella ed i nomi dei campi
SQL = "SELECT * FROM tabella WHERE data &gt;= (date()-7) Order by id desc "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.CursorLocation = 3
rs.Open SQL, Conn, 1,1
 
' Numero totale di records
totfiles = rs.recordcount
xml = "&lt;?xml version=""1.0"" encoding=""ISO-8859-1"" ?&gt;" &amp; _
      "&lt;rss version=""0.91""&gt;&lt;channel&gt;&lt;title&gt;Novità &lt;/title&gt;" &amp; _
      "&lt;description&gt;notizie&lt;/description&gt;" &amp; _
      "&lt;link&gt;http://www.miosito.it&lt;/link&gt;&lt;language&gt;it&lt;/language&gt;"
 
'Se il Record Set non è vuoto 
if totfiles &lt;&gt; 0 then
  Do while not rs.eof
    xml = xml &amp; "&lt;item&gt;"
    xml = xml &amp; "&lt;title&gt;&lt;![CDATA[" &amp; rs("specifica") &amp; "]]&gt;&lt;/title&gt;"
    xml = xml &amp; "&lt;description&gt;&lt;![CDATA[" &amp; rs("titolo") &amp; "]]&gt;&lt;/description&gt;"
    xml = xml &amp; "&lt;date&gt;&lt;![CDATA[" &amp; rs("data") &amp; "]]&gt;&lt;/date&gt;"
    xml = xml &amp; "&lt;link&gt;&lt;![CDATA[" &amp; "http://www.miosito/pagina.asp?id=" &amp;rs("id") &amp; "]]&gt;&lt;/link&gt;" 
  xml = xml &amp; "&lt;/item&gt;"
 
    rs.movenext
  Loop
End if
 
' Impostazione che setta il tipo di file in output su XML
response.ContentType = "text/xml"
response.write xml
 
'Libero Risorse
rs.close
set rs=nothing
Conn.Close
set Conn=nothing
%&gt; 
 
 
 
 
&lt;%
'Stringa di connessione al nostro Data Base di news
'da modificare in base al percorso del vostro Data Base
StrConnessione = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &amp; _
      server.MapPath("../db/") &amp; "\db2.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConnessione
 
'Istruzione SQL che prende le news dal Data Base;
'da cambiare con il nome della vostra tabella ed i nomi dei campi
SQL = "SELECT * FROM tabella2 WHERE data &gt;= (date()-7) Order by id desc "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.CursorLocation = 3
rs.Open SQL, Conn, 1,1
 
' Numero totale di records
totfiles = rs.recordcount
 
'Se il Record Set non è vuoto 
if totfiles &lt;&gt; 0 then
  Do while not rs.eof
    xml = xml &amp; "&lt;item&gt;"
    xml = xml &amp; "&lt;title&gt;&lt;![CDATA[" &amp; rs("titolo") &amp; "]]&gt;&lt;/title&gt;"
    xml = xml &amp; "&lt;description&gt;&lt;![CDATA[" &amp; rs("titolo") &amp; "]]&gt;&lt;/description&gt;"
    xml = xml &amp; "&lt;date&gt;&lt;![CDATA[" &amp; rs("data") &amp; "]]&gt;&lt;/date&gt;"
    xml = xml &amp; "&lt;link&gt;&lt;![CDATA[" &amp; "http://www.miosito.it/secondapagina.asp?news=" &amp;rs("news") &amp; "]]&gt;&lt;/link&gt;" 
  xml = xml &amp; "&lt;/item&gt;"
 
    rs.movenext
  Loop
End if
xml = xml &amp; "&lt;/channel&gt;&lt;/rss&gt;"
 
' Impostazione che setta il tipo di file in output su XML
response.ContentType = "text/xml"
response.write xml
 
'Libero Risorse
rs.close
set rs=nothing
Conn.Close
set Conn=nothing
%&gt; 
 
 
 
&lt;%
'Stringa di connessione al nostro Data Base di news
'da modificare in base al percorso del vostro Data Base
StrConnessione = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &amp; _
      server.MapPath("../db/") &amp; "\db3.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConnessione
 
'Istruzione SQL che prende le news dal Data Base;
'da cambiare con il nome della vostra tabella ed i nomi dei campi
SQL = "SELECT * FROM tabella3 WHERE data &gt;= (date()-7) Order by id desc "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.CursorLocation = 3
rs.Open SQL, Conn, 1,1
 
' Numero totale di records
totfiles = rs.recordcount
 
'Se il Record Set non è vuoto 
if totfiles &lt;&gt; 0 then
  Do while not rs.eof
    xml = xml &amp; "&lt;item&gt;"
    xml = xml &amp; "&lt;title&gt;&lt;![CDATA[" &amp; rs("specifica") &amp; "]]&gt;&lt;/title&gt;"
    xml = xml &amp; "&lt;description&gt;&lt;![CDATA[" &amp; rs("titolo") &amp; "]]&gt;&lt;/description&gt;"
    xml = xml &amp; "&lt;date&gt;&lt;![CDATA[" &amp; rs("data") &amp; "]]&gt;&lt;/date&gt;"
    xml = xml &amp; "&lt;link&gt;&lt;![CDATA[" &amp; "http://www.miosito.it/terzapagina.asp?id=" &amp;rs("id") &amp; "]]&gt;&lt;/link&gt;" 
  xml = xml &amp; "&lt;/item&gt;"
 
    rs.movenext
  Loop
End if
xml = xml &amp; "&lt;/channel&gt;&lt;/rss&gt;"
 
' Impostazione che setta il tipo di file in output su XML
response.ContentType = "text/xml"
response.write xml
 
'Libero Risorse
rs.close
set rs=nothing
Conn.Close
set Conn=nothing
%&gt;
</code></pre>
<p dir="auto">come posso modificare?</p>
<p dir="auto">grazie anticipate</p>
]]></description><link>https://dev.connect.gt/topic/21815/creazione-di-rss</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 09:06:28 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/21815.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Nov 2006 09:05:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to creazione di rss on Mon, 04 Dec 2006 09:13:01 GMT]]></title><description><![CDATA[<p dir="auto">Grazie mille!</p>
]]></description><link>https://dev.connect.gt/post/400345</link><guid isPermaLink="true">https://dev.connect.gt/post/400345</guid><dc:creator><![CDATA[100tek]]></dc:creator><pubDate>Mon, 04 Dec 2006 09:13:01 GMT</pubDate></item><item><title><![CDATA[Reply to creazione di rss on Sat, 02 Dec 2006 13:22:06 GMT]]></title><description><![CDATA[<p dir="auto"><a href="http://asp.html.it/articoli/leggi/698/feed-rss-in-asp/" rel="nofollow ugc">http://asp.html.it/articoli/leggi/698/feed-rss-in-asp/</a></p>
]]></description><link>https://dev.connect.gt/post/400339</link><guid isPermaLink="true">https://dev.connect.gt/post/400339</guid><dc:creator><![CDATA[flasini]]></dc:creator><pubDate>Sat, 02 Dec 2006 13:22:06 GMT</pubDate></item><item><title><![CDATA[Reply to creazione di rss on Sat, 02 Dec 2006 00:11:48 GMT]]></title><description><![CDATA[<p dir="auto">Postalo pure, sicuramente potrà aiutare altri utenti in futuro</p>
<p dir="auto"><img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=f1cecb658d8" class="not-responsive emoji emoji-customizations emoji--ciauz" style="height:1.4em;width:auto;vertical-align:middle" title=":ciauz:" alt="" /></p>
]]></description><link>https://dev.connect.gt/post/400333</link><guid isPermaLink="true">https://dev.connect.gt/post/400333</guid><dc:creator><![CDATA[legolas]]></dc:creator><pubDate>Sat, 02 Dec 2006 00:11:48 GMT</pubDate></item><item><title><![CDATA[Reply to creazione di rss on Fri, 01 Dec 2006 22:40:19 GMT]]></title><description><![CDATA[<p dir="auto">non so se posso postarlo</p>
<p dir="auto">si riferisce ad un sito concorrente forse</p>
<p dir="auto">che dice il mod?</p>
]]></description><link>https://dev.connect.gt/post/400338</link><guid isPermaLink="true">https://dev.connect.gt/post/400338</guid><dc:creator><![CDATA[flasini]]></dc:creator><pubDate>Fri, 01 Dec 2006 22:40:19 GMT</pubDate></item><item><title><![CDATA[Reply to creazione di rss on Thu, 30 Nov 2006 22:59:56 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>flasini</strong></p>
<p dir="auto">salve<br />
ho creato sulla base di un articolo letto uno script che legge alcuni record di un db li estrare e crea una pagine rss (anche se ha l'estensione asp)</p>
</blockquote>
<p dir="auto">Ciao, senti per caso l'articolo l'hai letto on-line? Potresti darmi il link in caso affermativo?</p>
]]></description><link>https://dev.connect.gt/post/400344</link><guid isPermaLink="true">https://dev.connect.gt/post/400344</guid><dc:creator><![CDATA[100tek]]></dc:creator><pubDate>Thu, 30 Nov 2006 22:59:56 GMT</pubDate></item><item><title><![CDATA[Reply to creazione di rss on Sun, 26 Nov 2006 17:59:54 GMT]]></title><description><![CDATA[<p dir="auto">Si, se vuoi puoi usare un solo &lt;%%&gt;</p>
<p dir="auto">Ho modificato il codice sopra quello di prima non era corretto</p>
<p dir="auto">Ciao</p>
]]></description><link>https://dev.connect.gt/post/400331</link><guid isPermaLink="true">https://dev.connect.gt/post/400331</guid><dc:creator><![CDATA[legolas]]></dc:creator><pubDate>Sun, 26 Nov 2006 17:59:54 GMT</pubDate></item><item><title><![CDATA[Reply to creazione di rss on Sun, 26 Nov 2006 13:27:25 GMT]]></title><description><![CDATA[<p dir="auto">grazie</p>
<p dir="auto">provo</p>
<p dir="auto">ultima cosa...<br />
non sarebbe meglio creare un solo &lt;% %&gt; ?<br />
le estrazioni ripetute tutte all'interno</p>
<p dir="auto">grazie</p>
]]></description><link>https://dev.connect.gt/post/400335</link><guid isPermaLink="true">https://dev.connect.gt/post/400335</guid><dc:creator><![CDATA[flasini]]></dc:creator><pubDate>Sun, 26 Nov 2006 13:27:25 GMT</pubDate></item><item><title><![CDATA[Reply to creazione di rss on Fri, 24 Nov 2006 00:26:16 GMT]]></title><description><![CDATA[<p dir="auto">Così non dovrebbe darti l'errore:</p>
<pre><code>'Stringa di connessione al nostro Data Base di news
'da modificare in base al percorso del vostro Data Base
StrConnessione = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &amp; _
      server.MapPath("../db/") &amp; "\db1.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConnessione
 
'Istruzione SQL che prende le news dal Data Base;
'da cambiare con il nome della vostra tabella ed i nomi dei campi
SQL = "SELECT * FROM tabella WHERE data &gt;= (date()-7) Order by id desc "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.CursorLocation = 3
rs.Open SQL, Conn, 1,1
 
' Numero totale di records
totfiles = rs.recordcount
xml = "&lt;?xml version=""1.0"" encoding=""ISO-8859-1"" ?&gt;" &amp; _
      "&lt;rss version=""0.91""&gt;&lt;channel&gt;&lt;title&gt;Novità &lt;/title&gt;" &amp; _
      "&lt;description&gt;notizie&lt;/description&gt;" &amp; _
      "&lt;link&gt;http://www.miosito.it&lt;/link&gt;&lt;language&gt;it&lt;/language&gt;"
 
'Se il Record Set non è vuoto 
if totfiles &lt;&gt; 0 then
  Do while not rs.eof
    xml = xml &amp; "&lt;item&gt;"
    xml = xml &amp; "&lt;title&gt;&lt;![CDATA[" &amp; rs("specifica") &amp; "]]&gt;&lt;/title&gt;"
    xml = xml &amp; "&lt;description&gt;&lt;![CDATA[" &amp; rs("titolo") &amp; "]]&gt;&lt;/description&gt;"
    xml = xml &amp; "&lt;date&gt;&lt;![CDATA[" &amp; rs("data") &amp; "]]&gt;&lt;/date&gt;"
    xml = xml &amp; "&lt;link&gt;&lt;![CDATA[" &amp; "http://www.miosito/pagina.asp?id=" &amp;rs("id") &amp; "]]&gt;&lt;/link&gt;" 
  xml = xml &amp; "&lt;/item&gt;"
 
    rs.movenext
  Loop
End if
xml = xml &amp; "&lt;/channel&gt;&lt;/rss&gt;"
' Impostazione che setta il tipo di file in output su XML
response.ContentType = "text/xml"
response.write xml
 
'Libero Risorse
rs.close
set rs=nothing
Conn.Close
set Conn=nothing
%&gt; 
 
 
 
 
&lt;%
'Stringa di connessione al nostro Data Base di news
'da modificare in base al percorso del vostro Data Base
StrConnessione = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &amp; _
      server.MapPath("../db/") &amp; "\db2.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConnessione
 
'Istruzione SQL che prende le news dal Data Base;
'da cambiare con il nome della vostra tabella ed i nomi dei campi
SQL = "SELECT * FROM tabella2 WHERE data &gt;= (date()-7) Order by id desc "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.CursorLocation = 3
rs.Open SQL, Conn, 1,1
 
' Numero totale di records
totfiles = rs.recordcount
 
'Se il Record Set non è vuoto 
if totfiles &lt;&gt; 0 then
  Do while not rs.eof
    xml = xml &amp; "&lt;item&gt;"
    xml = xml &amp; "&lt;title&gt;&lt;![CDATA[" &amp; rs("titolo") &amp; "]]&gt;&lt;/title&gt;"
    xml = xml &amp; "&lt;description&gt;&lt;![CDATA[" &amp; rs("titolo") &amp; "]]&gt;&lt;/description&gt;"
    xml = xml &amp; "&lt;date&gt;&lt;![CDATA[" &amp; rs("data") &amp; "]]&gt;&lt;/date&gt;"
    xml = xml &amp; "&lt;link&gt;&lt;![CDATA[" &amp; "http://www.miosito.it/secondapagina.asp?news=" &amp;rs("news") &amp; "]]&gt;&lt;/link&gt;" 
  xml = xml &amp; "&lt;/item&gt;"
 
    rs.movenext
  Loop
End if
xml = xml &amp; "&lt;/channel&gt;&lt;/rss&gt;"
 
' Impostazione che setta il tipo di file in output su XML
response.ContentType = "text/xml"
response.write xml
 
'Libero Risorse
rs.close
set rs=nothing
Conn.Close
set Conn=nothing
%&gt; 
 
 
 
&lt;%
'Stringa di connessione al nostro Data Base di news
'da modificare in base al percorso del vostro Data Base
StrConnessione = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &amp; _
      server.MapPath("../db/") &amp; "\db3.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConnessione
 
'Istruzione SQL che prende le news dal Data Base;
'da cambiare con il nome della vostra tabella ed i nomi dei campi
SQL = "SELECT * FROM tabella3 WHERE data &gt;= (date()-7) Order by id desc "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.CursorLocation = 3
rs.Open SQL, Conn, 1,1
 
' Numero totale di records
totfiles = rs.recordcount
 
'Se il Record Set non è vuoto 
if totfiles &lt;&gt; 0 then
  Do while not rs.eof
    xml = xml &amp; "&lt;item&gt;"
    xml = xml &amp; "&lt;title&gt;&lt;![CDATA[" &amp; rs("specifica") &amp; "]]&gt;&lt;/title&gt;"
    xml = xml &amp; "&lt;description&gt;&lt;![CDATA[" &amp; rs("titolo") &amp; "]]&gt;&lt;/description&gt;"
    xml = xml &amp; "&lt;date&gt;&lt;![CDATA[" &amp; rs("data") &amp; "]]&gt;&lt;/date&gt;"
    xml = xml &amp; "&lt;link&gt;&lt;![CDATA[" &amp; "http://www.miosito.it/terzapagina.asp?id=" &amp;rs("id") &amp; "]]&gt;&lt;/link&gt;" 
  xml = xml &amp; "&lt;/item&gt;"
 
    rs.movenext
  Loop
End if
xml = xml &amp; "&lt;/channel&gt;&lt;/rss&gt;"
 
' Impostazione che setta il tipo di file in output su XML
response.ContentType = "text/xml"
response.write xml
 
'Libero Risorse
rs.close
set rs=nothing
Conn.Close
set Conn=nothing
%&gt;
</code></pre>
<p dir="auto">Ciao<br />
<img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=f1cecb658d8" class="not-responsive emoji emoji-customizations emoji--ciauz" style="height:1.4em;width:auto;vertical-align:middle" title=":ciauz:" alt="" /><img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=f1cecb658d8" class="not-responsive emoji emoji-customizations emoji--ciauz" style="height:1.4em;width:auto;vertical-align:middle" title=":ciauz:" alt="" /></p>
]]></description><link>https://dev.connect.gt/post/400332</link><guid isPermaLink="true">https://dev.connect.gt/post/400332</guid><dc:creator><![CDATA[legolas]]></dc:creator><pubDate>Fri, 24 Nov 2006 00:26:16 GMT</pubDate></item></channel></rss>