<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>diploD &#187; xml</title>
	<atom:link href="http://www.diplod.it/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.diplod.it</link>
	<description>by Davide Del Monte</description>
	<lastBuildDate>Fri, 13 Feb 2015 14:26:10 +0000</lastBuildDate>
	<language>it-IT</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Leggere e visualizzare file XML con C# (C sharp): qualche esempio</title>
		<link>http://www.diplod.it/2010/07/13/leggere-e-visualizzare-file-xml-con-c-c-sharp-qualche-esempio/</link>
		<comments>http://www.diplod.it/2010/07/13/leggere-e-visualizzare-file-xml-con-c-c-sharp-qualche-esempio/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 12:31:32 +0000</pubDate>
		<dc:creator><![CDATA[Davide]]></dc:creator>
				<category><![CDATA[Applicazioni Web]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[aspx]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xsd]]></category>

		<guid isPermaLink="false">http://www.diplod.it/?p=1127</guid>
		<description><![CDATA[C# è ormai un linguaggio diffuso, Visual Studio volenti o nolenti è un IDE collaudato e comodo anche per lo sviluppo di applicazioni web. E quando si parla di web, si parla spesso di XML. Leggere i dati di un documento XML è un'operazione semplice e veloce, farli visualizzare su una pagina web è altrettanto rapido, ma è bene sapere alcune nozioni per potersi muovere con tranquillità e sicurezza.]]></description>
				<content:encoded><![CDATA[<p><strong>C#</strong> è ormai un linguaggio diffuso, <strong>Visual Studio</strong> volenti o nolenti è un IDE collaudato e comodo anche per lo sviluppo di applicazioni web. E quando si parla di web, si parla spesso di <strong>XML</strong>.</p>
<p>Leggere i dati di un documento XML è un&#8217;operazione semplice e veloce, farli visualizzare su una pagina web è altrettanto rapido, ma è bene sapere alcune nozioni per potersi muovere con tranquillità e sicurezza.</p>
<p>Andiamo con ordine e vediamo subito un esempio di un file XML che vogliamo trattare:</p>
<p><code>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;<br />
&lt;DataSet&gt;<br />
&lt;data&gt;<br />
&lt;period&gt;2010-06-06&lt;/period&gt;<br />
&lt;logunit id="myID"&gt;Milano&lt;/logunit&gt;<br />
&lt;entered matcode="ABC001"&gt;100&lt;/entered&gt;<br />
&lt;produced matcode="ABC002"&gt;101&lt;/produced&gt;<br />
&lt;delivered matcode="ABC002"&gt;100&lt;/delivered&gt;<br />
&lt;description&gt;Caramelline alla fragola&lt;/description&gt;<br />
&lt;updated&gt;2010-06-06T13:05:21+01:00&lt;/updated&gt;<br />
&lt;note&gt;tante belle cose..&lt;/note&gt;<br />
&lt;/data&gt;<br />
&lt;data&gt;<br />
[..]<br />
&lt;/data&gt;<br />
&lt;/DataSet&gt;</code></p>
<p>Questo file potrebbe rappresentare dei dati produttivi, riguardanti ad esempio i materiali entrati in magazzino, i materiali prodotti e il venduto.</p>
<p>Il modo più rapido e banale per leggere questo file e farlo visualizzare su una pagina ASPX è tramite il seguente codice:</p>
<p><code>DataSet ds = new DataSet();<br />
ds.ReadXml(@"C:\test.xml", XmlReadMode.Auto);<br />
DataView MyDataView = new DataView(ds.Tables[0]);<br />
MyDataGrid.DataSource = MyDataView;<br />
MyDataGrid.DataBind();</code></p>
<p>Il codice non fa altro che creare un nuovo DataSet per contenere i dati che andremo a leggere, leggere il file tramite il metodo ReadXml(), creare una DataView con la tabella creata nel dataset e assegnare quest&#8217;ultima come DataSource per la DataGrid.</p>
<p><span id="more-1127"></span></p>
<p>All&#8217;interno della pagina .aspx ci sarà quindi una DataSource così fatta:</p>
<p><code>&lt;asp:DataGrid id="MyDataGrid" runat="server" &gt;<br />
    &lt;HeaderStyle CssClass="th"&gt;<br />
    &lt;/HeaderStyle&gt;<br />
&lt;/asp:DataGrid&gt;</code></p>
<p>Tralasciamo lo stile attribuito alla testata della datagrid, ciò che è importante in questo caso è solo l&#8217;ID. </p>
<p>Così facendo però ottengo una tabella di questo tipo:</p>
<table id="MyDataGrid2" border="1" cellspacing="0" rules="all">
<tbody>
<tr>
<td>period</td>
<td>data_Id</td>
<td>description</td>
<td>updated</td>
<td>note</td>
</tr>
<tr>
<td>2010-06-06</td>
<td>0</td>
<td>Caramelline alla fragola</td>
<td>2010-06-16T13:05:21+01:00</td>
<td>tante belle cose..</td>
</tr>
</tbody>
</table>
<p>E tutti gli altri dati che fine hanno fatto? Sono stati salvati in altre tabelle del DataSet, assieme a tutti gli attributi dell&#8217;xml; queste tabelle avranno come riferimento il <em>data_Id</em> e potrò utilizzarle come meglio credo.</p>
<p>Se infatti cambiamo il primo codice, mettendo una tabella diversa, in questo modo:</p>
<p><code>DataView MyDataView = new DataView(ds.Tables[1]);</code></p>
<p>Verrà visualizzata una pagina con la seguente tabella:</p>
<table id="MyDataGrid2" border="1" cellspacing="0" rules="all">
<tbody>
<tr>
<td>id</td>
<td>logunit_Text</td>
<td>data_Id</td>
</tr>
<tr>
<td>MyID</td>
<td>Milano</td>
<td>0</td>
</tr>
</tbody>
</table>
<p>Se cambio e metto la terza tabella:</p>
<p><code>DataView MyDataView = new DataView(ds.Tables[2]);</code></p>
<p>Il risultato sarà:</p>
<table id="MyDataGrid2" border="1" cellspacing="0" rules="all">
<tbody>
<tr>
<td>matcode</td>
<td>entered_Text</td>
<td>data_Id</td>
</tr>
<tr>
<td>ABC001</td>
<td>100</td>
<td>0</td>
</tr>
</tbody>
</table>
<p>Mentre per le tabelle successive, avrò questi risultati visualizzati:</p>
<table id="MyDataGrid2" border="1" cellspacing="0" rules="all">
<tbody>
<tr>
<td>matcode</td>
<td>produced_Text</td>
<td>data_Id</td>
</tr>
<tr>
<td>ABC002</td>
<td>101</td>
<td>0</td>
</tr>
</tbody>
</table>
<table id="MyDataGrid2" border="1" cellspacing="0" rules="all">
<tbody>
<tr>
<td>matcode</td>
<td>delivered_Text</td>
<td>data_Id</td>
</tr>
<tr>
<td>ABC002</td>
<td>100</td>
<td>0</td>
</tr>
</tbody>
</table>
<p>Incrociando queste tabelle attraverso il campo <em>data_Id</em> potrei ricavare tutti i dati contenuti nell&#8217;XML, attributi e testi all&#8217;interno dei tag.<br />
Il mio obiettivo era però quello di far visualizzare questi dati senza gli attributi riportati nell&#8217;XML. Ciò che mi interessa sono solo i dati riportati all&#8217;interno dei tag. Vorrei avere un risultato di questo tipo:</p>
<table id="MyDataGrid2" border="1" cellspacing="0" rules="all">
<tbody>
<tr>
<td>period</td>
<td>description</td>
<td>updated</td>
<td>note</td>
<td>logunit</td>
<td>entered</td>
<td>produced</td>
<td>delivered</td>
</tr>
<tr>
<td>2010-06-06</td>
<td>Caramelline alla fragola</td>
<td>2010-06-16T13:05:21+01:00</td>
<td>tante belle cose..</td>
<td>Milano</td>
<td>100</td>
<td>101</td>
<td>100</td>
</tr>
</tbody>
</table>
<p>In questo caso potrebbe fare al caso nostro l&#8217; <a title="XML Schema" href="http://www.w3schools.com/schema/default.asp" target="_blank">XML Schema</a>. Si tratta di un file con estensione XSD, che descrive i dati contenuti in un file XML. Ogni file XML può avere uno schema associato che lo descrive. Esistono diversi <strong>tool</strong> che possono <strong>creare un file XSD a partire da un XML</strong>, uno di questi, che trovo molto pratico è <a title="XML 2 XSD" href="http://www.flame-ware.com/products/xml-2-xsd/default.aspx" target="_blank">quello di Flame-Ware</a> completamente on-line. </p>
<p>Il nostro file XML iniziale potrebbe essere descritto da questo XSD, supponendo che tutti i campi siano stringe.</p>
<p><code>&lt;?xml version="1.0"?&gt;<br />
&lt;!-- Generated using Flame-Ware Solutions XML-2-XSD v2.0 at <a href="http://www.flame-ware.com/Products/XML-2-XSD/">http://www.flame-ware.com/Products/XML-2-XSD/</a> --&gt;<br />
&lt;xs:schema id="DataSet" xmlns="" xmlns:xs="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&gt;<br />
  &lt;xs:element name="DataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"&gt;<br />
    &lt;xs:complexType&gt;<br />
      &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;<br />
        &lt;xs:element name="data"&gt;<br />
          &lt;xs:complexType&gt;<br />
            &lt;xs:sequence&gt;<br />
              &lt;xs:element name="period" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="description" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="updated" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="note" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="logunit" nillable="true" minOccurs="0" maxOccurs="unbounded"&gt;<br />
                &lt;xs:complexType&gt;<br />
                  &lt;xs:simpleContent msdata:ColumnName="logunit_Text" msdata:Ordinal="1"&gt;<br />
                    &lt;xs:extension base="xs:string"&gt;<br />
                      &lt;xs:attribute name="id" type="xs:string" /&gt;<br />
                    &lt;/xs:extension&gt;<br />
                  &lt;/xs:simpleContent&gt;<br />
                &lt;/xs:complexType&gt;<br />
              &lt;/xs:element&gt;<br />
              &lt;xs:element name="entered" nillable="true" minOccurs="0" maxOccurs="unbounded"&gt;<br />
                &lt;xs:complexType&gt;<br />
                  &lt;xs:simpleContent msdata:ColumnName="entered_Text" msdata:Ordinal="1"&gt;<br />
                    &lt;xs:extension base="xs:string"&gt;<br />
                      &lt;xs:attribute name="matcode" type="xs:string" /&gt;<br />
                    &lt;/xs:extension&gt;<br />
                  &lt;/xs:simpleContent&gt;<br />
                &lt;/xs:complexType&gt;<br />
              &lt;/xs:element&gt;<br />
              &lt;xs:element name="produced" nillable="true" minOccurs="0" maxOccurs="unbounded"&gt;<br />
                &lt;xs:complexType&gt;<br />
                  &lt;xs:simpleContent msdata:ColumnName="produced_Text" msdata:Ordinal="1"&gt;<br />
                    &lt;xs:extension base="xs:string"&gt;<br />
                      &lt;xs:attribute name="matcode" type="xs:string" /&gt;<br />
                    &lt;/xs:extension&gt;<br />
                  &lt;/xs:simpleContent&gt;<br />
                &lt;/xs:complexType&gt;<br />
              &lt;/xs:element&gt;<br />
              &lt;xs:element name="delivered" nillable="true" minOccurs="0" maxOccurs="unbounded"&gt;<br />
                &lt;xs:complexType&gt;<br />
                  &lt;xs:simpleContent msdata:ColumnName="delivered_Text" msdata:Ordinal="1"&gt;<br />
                    &lt;xs:extension base="xs:string"&gt;<br />
                      &lt;xs:attribute name="matcode" type="xs:string" /&gt;<br />
                    &lt;/xs:extension&gt;<br />
                  &lt;/xs:simpleContent&gt;<br />
                &lt;/xs:complexType&gt;<br />
              &lt;/xs:element&gt;<br />
            &lt;/xs:sequence&gt;<br />
          &lt;/xs:complexType&gt;<br />
        &lt;/xs:element&gt;<br />
      &lt;/xs:choice&gt;<br />
    &lt;/xs:complexType&gt;<br />
  &lt;/xs:element&gt;<br />
&lt;/xs:schema&gt;</code></p>
<p>Per associare questo schema al file XML, è necessario dichiararlo nell&#8217;intestazione, in questo modo:</p>
<p><code>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;<br />
&lt;DataSet <span style="color: #800000;">xmlns:xsi="</span><a href="http://www.w3.org/2001/XMLSchema-instance"><span style="color: #800000;">http://www.w3.org/2001/XMLSchema-instance</span></a><span style="color: #800000;">"<br />
xsi:noNamespaceSchemaLocation="schema.xsd"</span>&gt;<br />
&lt;data&gt;<br />
&lt;period&gt;2010-06-06&lt;/period&gt;<br />
&lt;logunit id="myID"&gt;Milano&lt;/logunit&gt;<br />
&lt;entered matcode="ABC001"&gt;100&lt;/entered&gt;<br />
&lt;produced matcode="ABC002"&gt;101&lt;/produced&gt;<br />
&lt;delivered matcode="ABC002"&gt;100&lt;/delivered&gt;<br />
&lt;description&gt;Caramelline alla fragola&lt;/description&gt;<br />
&lt;updated&gt;2010-06-06T13:05:21+01:00&lt;/updated&gt;<br />
&lt;note&gt;tante belle cose..&lt;/note&gt;<br />
&lt;/data&gt;<br />
&lt;/DataSet&gt;</code></p>
<p>Così facendo però, se rilanciamo la pagina costruita in precedenza, il risultato sarà identico: un unico dataset con diverse tabelle collegate tra loro dal campo <em>data_Id</em>.</p>
<p>Quindi? La soluzione c&#8217;è. <strong>Dobbiamo solo definire uno schema XSD semplificato all&#8217;interno dell&#8217;XML stesso</strong>. In questo modo:</p>
<p><code>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;<br />
&lt;DataSet&gt;<br />
<span style="color: #800000;">&lt;xs:schema id="NewDataset" xmlns="" xmlns:xs="</span><a href="http://www.w3.org/2001/XMLSchema"><span style="color: #800000;">http://www.w3.org/2001/XMLSchema</span></a><span style="color: #800000;">" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&gt;<br />
  &lt;xs:element name="NewDataset" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"&gt;<br />
    &lt;xs:complexType&gt;<br />
      &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;<br />
        &lt;xs:element name="data"&gt;<br />
          &lt;xs:complexType&gt;<br />
            &lt;xs:sequence&gt;<br />
              &lt;xs:element name="period" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="description" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="updated" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="note" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="logunit" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="entered" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="produced" type="xs:string" minOccurs="0" /&gt;<br />
              &lt;xs:element name="delivered" type="xs:string" minOccurs="0" /&gt;<br />
            &lt;/xs:sequence&gt;<br />
          &lt;/xs:complexType&gt;<br />
        &lt;/xs:element&gt;<br />
      &lt;/xs:choice&gt;<br />
    &lt;/xs:complexType&gt;<br />
  &lt;/xs:element&gt;<br />
&lt;/xs:schema&gt;<br />
</span>&lt;data&gt;<br />
&lt;period&gt;2010-06-06&lt;/period&gt;<br />
&lt;logunit id="myID"&gt;Milano&lt;/logunit&gt;<br />
&lt;entered matcode="ABC001"&gt;100&lt;/entered&gt;<br />
&lt;produced matcode="ABC002"&gt;101&lt;/produced&gt;<br />
&lt;delivered matcode="ABC002"&gt;100&lt;/delivered&gt;<br />
&lt;description&gt;Caramelline alla fragola&lt;/description&gt;<br />
&lt;updated&gt;2010-06-06T13:05:21+01:00&lt;/updated&gt;<br />
&lt;note&gt;tante belle cose..&lt;/note&gt;<br />
&lt;/data&gt;<br />
&lt;data&gt;<br />
&lt;period&gt;2010-06-06&lt;/period&gt;<br />
&lt;logunit id="myID"&gt;Milano&lt;/logunit&gt;<br />
&lt;entered matcode="ABC001"&gt;100&lt;/entered&gt;<br />
&lt;produced matcode="ABC002"&gt;101&lt;/produced&gt;<br />
&lt;delivered matcode="ABC002"&gt;100&lt;/delivered&gt;<br />
&lt;description&gt;Caramelline alla fragola&lt;/description&gt;<br />
&lt;updated&gt;2010-06-06T13:05:21+01:00&lt;/updated&gt;<br />
&lt;note&gt;tante belle cose..&lt;/note&gt;<br />
&lt;/data&gt;<br />
&lt;/DataSet&gt;</code></p>
<p>Il <strong>risultato finale</strong> sarà quindi una DataGrid che può essere visualizzata come sotto, utilizzando pari pari il <strong>codice C# definito all&#8217;inizio</strong> di questo articolo.</p>
<table id="MyDataGrid2" border="1" cellspacing="0" rules="all">
<tbody>
<tr>
<td>period</td>
<td>description</td>
<td>updated</td>
<td>note</td>
<td>logunit</td>
<td>entered</td>
<td>produced</td>
<td>delivered</td>
</tr>
<tr>
<td>2010-06-06</td>
<td>Caramelline alla fragola</td>
<td>2010-06-16T13:05:21+01:00</td>
<td>tante belle cose..</td>
<td>Milano</td>
<td>100</td>
<td>101</td>
<td>100</td>
</tr>
</tbody>
</table>
<p>Buon divertimento con l&#8217;XML..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diplod.it/2010/07/13/leggere-e-visualizzare-file-xml-con-c-c-sharp-qualche-esempio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Un esempio di applicazione ajax ottimizzata per dispositivi mobili: xml e javascript.</title>
		<link>http://www.diplod.it/2010/04/22/un-esempio-di-applicazione-ajax-ottimizzata-per-dispositivi-mobili-xml-e-javascript/</link>
		<comments>http://www.diplod.it/2010/04/22/un-esempio-di-applicazione-ajax-ottimizzata-per-dispositivi-mobili-xml-e-javascript/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 17:43:48 +0000</pubDate>
		<dc:creator><![CDATA[Davide]]></dc:creator>
				<category><![CDATA[Ajax e Javascript]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[cellulari]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[web20]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.diplod.it/?p=1066</guid>
		<description><![CDATA[Ajax è sempre cool, se poi lo affianchi a iPhone &#038; Co. è ancora più cool. Perchè non vedere un esempio di applicazione web fruibile da cellulare che va a interrogare i dati contenuti in un file xml? Pensiamo ai webservices, ormai l'xml è un po' ovunque. Dobbiamo solo sfruttarlo.]]></description>
				<content:encoded><![CDATA[<p><strong><a title="ajax - wikipedia" href="http://it.wikipedia.org/wiki/AJAX" target="_blank">Ajax </a></strong>è sempre <strong>cool</strong>, se poi lo affianchi a iPhone &amp; Co. è ancora più cool. Perchè non vedere un esempio di applicazione web fruibile da cellulare che va a interrogare i dati contenuti in un file xml? Pensiamo ai <a title="Webservice - wikipedia" href="http://it.wikipedia.org/wiki/Web_service" target="_blank"><strong>webservices</strong></a>, ormai l&#8217;xml è un po&#8217; ovunque. Dobbiamo solo sfruttarlo.</p>
<p>Alcune utili consigli per chi sviluppa applicazioni ajax destinate ad essere fruibili attraverso dispositivi mobili:</p>
<ul>
<li><strong>Blackberry</strong>: il browser deve essere abilitato per usare javascript. Inoltre, se si fa largo uso dello script lato client, è bene evitare di spuntare tra le opzioni il flag &#8220;Termina script in esecuzione lenti&#8221;, un semplice <a title="bubble sort - wikipedia" href="http://it.wikipedia.org/wiki/Bubble_sort" target="_blank">Bubble Sort</a> lo manderebbe in tilt.</li>
<li><strong>Nokia </strong>(symbian): nel browser standard il metodo <em>open(&#8220;GET&#8221;,&#8221;xml/test2.xml&#8221;,true)</em> funziona solo in modalità asincrona, ovvero con l&#8217;ultimo parametro settato a true; scaricando il browser <a title="Opera Mini" href="http://www.opera.com/mobile/" target="_blank">Opera Mini</a> invece non ci sono problemi in entrambi i casi: sincrono/asincrono.</li>
<li><strong>iPhone</strong>: che dire.. finora nessun problem riscontrato: browser e processore appartengono a una categoria superiore.</li>
</ul>
<p>Purtroppo non ho ancora avuto modo di fare test su dispositivi con <a title="Android" href="http://www.android.com/" target="_blank">Android</a>..</p>
<p>Ma veniamo al dunque.. Tutto prende il via dagli <a title="W3C - ajax examples" href="http://www.w3schools.com/ajax/ajax_examples.asp" target="_blank">esempi sul sito W3C</a>, utilissimi per fare pratica.</p>
<p>L&#8217;obiettivo è realizzare una applicazione che va a interrogare un file xml, riportante i dati di produzione (magari estratti direttamente dal gestionale aziendale), visualizzandoli in maniera ottimizzata per schermi di modeste dimensioni.</p>
<p>L&#8217;esempio con il risultato finale è <a title="Esempio XML Ajax" href="http://lab.diplod.it/xml2" target="_blank">visibile qui</a>.</p>
<p>Questa è la struttura dela file XML:<br />
<code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;db&gt;<br />
&lt;item&gt;<br />
&lt;period&gt;04.2010&lt;/period&gt; &lt;!-- Periodo: mese o giorno --&gt;<br />
&lt;logunit id="0010"&gt;Italy Milan&lt;/logunit&gt; &lt;!-- Divisione di produzione--&gt;<br />
&lt;delivered matcode="000123"&gt;268&lt;/delivered&gt; &lt;!-- Quantita' spedita --&gt;<br />
&lt;finished matcode="100123"&gt;265&lt;/finished&gt; &lt;!-- Quantita' versata --&gt;<br />
&lt;description&gt;Product One&lt;/description&gt; &lt;!-- Descrizione codice materiale  --&gt;<br />
&lt;update&gt;15.04.2010 - 16:43&lt;/update&gt; &lt;!-- Ultimo aggiornamento --&gt;<br />
&lt;/item&gt;<br />
&lt;/db&gt;<br />
</code><br />
<span id="more-1066"></span>Supponiamo di voler offrire all&#8217;utente un menù per selezionare la divisione logistica su cui fare l&#8217;analisi e filtrare così i dati relativi alla singola divisione raggruppati in righe in base agli intervalli temporali, cliccando sulla singola riga è poi possibile vedere il dettaglio.</p>
<p>Ecco il codice della pagina web, con il suo javascript:<br />
<code>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Mobile Web Access&lt;/title&gt;<br />
&lt;script type="text/javascript"&gt;<br />
var xmlDoc;<br />
var x; //array dove memorizzo la risposta xml<br />
//inizio chiamata<br />
if (window.XMLHttpRequest)<br />
{<br />
xhttp=new XMLHttpRequest();<br />
if (xhttp.overrideMimeType) {<br />
xhttp.overrideMimeType('text/xml');<br />
}<br />
}<br />
else // Internet Explorer 5/6<br />
{<br />
xhttp=new ActiveXObject("Microsoft.XMLHTTP");<br />
}<br />
xhttp.onreadystatechange = alertContents; //gestione eventuali errori<br />
xhttp.open("GET","xml/test2.xml",true); //chiamata asincrona<br />
xhttp.send("");<br />
// Questo metodo viene eseguito in modo asincrono quando arriva la risposta dal server<br />
function alertContents() {<br />
if (xhttp.readyState == 4) {<br />
if (xhttp.status == 200) {<br />
processResponse(); //gestione risposta<br />
}<br />
else {<br />
document.write('&lt;small&gt;There was a problem with the request, sorry. Try later or contact your system administrator..&lt;/small&gt;');<br />
}<br />
}<br />
}<br />
function processResponse() {<br />
xmlDoc=xhttp.responseXML;<br />
x=xmlDoc.getElementsByTagName("item");<br />
}<br />
//mostra i dati nel div in alto<br />
function show(i) {<br />
logunit=(x[i].getElementsByTagName("logunit")[0].childNodes[0].nodeValue);<br />
logunitID=(x[i].getElementsByTagName("logunit")[0].getAttribute("id"));<br />
period=(x[i].getElementsByTagName("period")[0].childNodes[0].nodeValue);<br />
description=(x[i].getElementsByTagName("description")[0].childNodes[0].nodeValue);<br />
delivered=(x[i].getElementsByTagName("delivered")[0].childNodes[0].nodeValue);<br />
deliveredCode=(x[i].getElementsByTagName("delivered")[0].getAttribute("code"));<br />
finished=(x[i].getElementsByTagName("finished")[0].childNodes[0].nodeValue);<br />
finishedCode=(x[i].getElementsByTagName("finished")[0].getAttribute("code"));<br />
update=(x[i].getElementsByTagName("update")[0].childNodes[0].nodeValue);<br />
txt="&lt;strong&gt;Logistic Unit&lt;/strong&gt;: "+logunitID+" - "+logunit+"&lt;br /&gt;&lt;strong&gt;Period&lt;/strong&gt;: "+period+"&lt;br /&gt;&lt;strong&gt;Description&lt;/strong&gt;: "+description+"&lt;br /&gt;&lt;img style='float:left; margin-right: 2px;' src='icon.png' alt='icon'/&gt;&lt;strong&gt;Delivered&lt;/strong&gt;: "+delivered+"&lt;br /&gt;&lt;strong&gt;Finished&lt;/strong&gt;: "+finished+"&lt;br /&gt;&lt;div style='border: 1px dotted #fff; padding: 2px; background: #f9f9f9; color: #666;'&gt;&lt;small&gt;&lt;em&gt;Last update: "+update+"&lt;/em&gt;&lt;/small&gt;&lt;br/&gt;&lt;small&gt;&lt;a href='#item"+i+"'&gt;Go Down To List..&lt;/a&gt; | &lt;a href='#show' onclick='show(" + (i-1) + ")'&gt;Prev..&lt;/a&gt; | &lt;a href='#show' onclick='show(" + (i+1) + ")'&gt;Next..&lt;/a&gt;&lt;/small&gt;&lt;/div&gt;"  ;<br />
document.getElementById("show").innerHTML=txt;<br />
}<br />
//crea tabella coi record relativi alla singola divisione<br />
function createTable(t) {<br />
document.getElementById("show").innerHTML="&lt;em&gt;"+t+": click on a table row to display the full production information.&lt;/em&gt;";<br />
txt="&lt;table style='border: 2px solid #ccc; width: 100%;'&gt;";<br />
altStyle=0;<br />
for (var i=0;i&lt;x.length;i++)<br />
{<br />
if (x[i].getElementsByTagName("logunit")[0].getAttribute("id")==t) {<br />
altStyle++;<br />
if (altStyle % 2 == 0) { txt=txt+"&lt;tr style='background: #e3efff;' onclick='show(" + i + ")'&gt;"; }<br />
else { txt=txt+"&lt;tr style='border-bottom: 1px dotted #ccc;' onclick='show(" + i + ")'&gt;"; }<br />
txt=txt+"&lt;td id='item"+i+"'&gt;&lt;img src='cal.png' alt='ico'/&gt;&lt;a href='#show'&gt;";<br />
txt=txt+(x[i].getElementsByTagName("period")[0].childNodes[0].nodeValue);<br />
txt=txt+"&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;img src='car.png' alt='ico'/&gt;&lt;a href='#show'&gt;";<br />
txt=txt+(x[i].getElementsByTagName("description")[0].childNodes[0].nodeValue);<br />
txt=txt+"&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;";<br />
}<br />
}<br />
txt=txt+"&lt;/table&gt;";<br />
document.getElementById("table-content").innerHTML=txt;<br />
}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;img src='mobile-logo.gif' alt='logo' /&gt;&lt;br/&gt;<br />
&lt;div id='show' style='background: #e3efff; padding: 3px; margin: 3px 0; border: 2px solid #ccc;'&gt;&lt;em&gt;Select Logistic Unit then click on a table row to display the full production information.&lt;/em&gt;&lt;/div&gt;<br />
&lt;!--Per aggiungere una divisione, modificare questo menu --&gt;<br />
&lt;img src='industry.png' alt='ico'/&gt;&lt;a href='#show' onclick='createTable("0010")'&gt;Italy Milan&lt;/a&gt; | &lt;img src='industry.png' alt='ico'/&gt;&lt;a href='#show' onclick='createTable("0020")'&gt;Italy Rome&lt;/a&gt; | &lt;img src='industry.png' alt='ico'/&gt;&lt;a href='#show' onclick='createTable("0030")'&gt;USA&lt;/a&gt; | &lt;img src='industry.png' alt='ico'/&gt;&lt;a href='#show' onclick='createTable("0040")'&gt;Germany&lt;/a&gt; | &lt;img src='industry.png' alt='ico'/&gt;&lt;a href='#show' onclick='createTable("0050")'&gt;China&lt;/a&gt; | &lt;img src='industry.png' alt='ico'/&gt;&lt;a href='#show' onclick='createTable("0060")'&gt;Brasil&lt;/a&gt;<br />
&lt;!-- fine menu selezione divisione --&gt;<br />
&lt;div id='table-content'&gt;&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</code></p>
<p>Il codice è interamente commentato, e più che descriverlo a parole vale la pena scorrerlo e leggere i commenti. <strong>Se vuoi scaricare l&#8217;esempio completo, con sorgenti e immagini: </strong><a title="xml ajax - esempio" href="http://www.diplod.it/wp-content/uploads/2010/04/xml-demo.zip"><strong>ecco lo zip</strong></a>.</p>
<p>La scelta di incorporare css e javascript all&#8217;interno della stessa singola pagina è voluta, per ottimizzare il caricamento da parte di dispositivi mobili. Certo questa è solo una base di partenza, dalla quale si potrebbero sviluppare altre funzionalità: l&#8217;esigenza di avere dati disponibili anche su <strong>dispositivi mobili</strong> è sempre più sentita; è inevitabile che in <strong>futuro</strong> si debba far fronte a queste richieste.<br />
In fondo è pure divertente!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diplod.it/2010/04/22/un-esempio-di-applicazione-ajax-ottimizzata-per-dispositivi-mobili-xml-e-javascript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Un po di XSL per processare un feed di Google News</title>
		<link>http://www.diplod.it/2008/12/18/un-po-di-xsl-per-processare-un-feed-di-google-news/</link>
		<comments>http://www.diplod.it/2008/12/18/un-po-di-xsl-per-processare-un-feed-di-google-news/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 23:06:56 +0000</pubDate>
		<dc:creator><![CDATA[Davide]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xsl]]></category>

		<guid isPermaLink="false">http://www.diplod.it/?p=715</guid>
		<description><![CDATA[L&#8217;obiettivo è visualizzare con una trasformazione XSL il contenuto di un feed generato da Google News per una determinata parola la chiave. Come esempio ho lanciato la ricerca di tutte le notizie riguardanti &#8220;Obama&#8221; e questo è l&#8217;url del feed prodotto: http://news.google.it/news?hl=it&#38;ned=it&#38;q=obama&#38;ie=UTF-8&#38;nolr=1&#38;output=rss Come noto, un feed RSS è un documento XML. La formattazione è classica: [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>L&#8217;obiettivo è visualizzare con una trasformazione <a title="Extensible Stylesheet Language" href="http://it.wikipedia.org/wiki/Extensible_Stylesheet_Language" target="_blank">XSL</a> il contenuto di un feed generato da <a title="Google News" href="http://news.google.it" target="_blank">Google News</a> per una determinata parola la chiave. Come esempio ho lanciato la ricerca di tutte le notizie riguardanti &#8220;Obama&#8221; e questo è l&#8217;url del feed prodotto:<br />
<a title="feed google news su obama" href="http://news.google.it/news?hl=it&amp;ned=it&amp;q=obama&amp;ie=UTF-8&amp;nolr=1&amp;output=rss" target="_blank">http://news.google.it/news?hl=it&amp;ned=it&amp;q=obama&amp;ie=UTF-8&amp;nolr=1&amp;output=rss</a></p>
<p>Come noto, un feed <a title="RSS - wikipedia" href="http://it.wikipedia.org/wiki/Really_simple_syndication" target="_blank">RSS</a> è un documento <a title="XML - wikipedia" href="http://it.wikipedia.org/wiki/XML" target="_blank">XML</a>. La formattazione è classica:</p>
<blockquote><p><strong>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;rss version=&#8221;2.0&#8243;&gt;<br />
&lt;channel&gt;<br />
&lt;generator&gt;</strong>NFE/1.0<strong>&lt;/generator&gt;</strong><br />
<strong>&lt;title&gt;</strong>obama &#8211; Google News<strong>&lt;/title&gt;</strong><br />
<strong>&lt;link&gt;</strong>http://news.google.it/news?hl=it&amp;ned=it&amp;q=obama&amp;ie=UTF-8<strong>&lt;/link&gt;</strong><br />
<strong>&lt;language&gt;</strong>it<strong>&lt;/language&gt;</strong><br />
<strong>&lt;webMaster&gt;</strong>news-feedback@google.com<strong>&lt;/webMaster&gt;</strong><br />
<strong>&lt;copyright&gt;</strong>©2008 Google<strong>&lt;/copyright&gt;</strong><br />
<strong>&lt;pubDate&gt;</strong>Mon, 15 Dec 2008 14:34:32 GMT<strong>&lt;/pubDate&gt;</strong><br />
<strong>&lt;lastBuildDate&gt;</strong>Mon, 15 Dec 2008 14:34:32 GMT<strong>&lt;/lastBuildDate&gt;</strong><br />
<strong>&lt;image&gt;<br />
&lt;title&gt;</strong>obama &#8211; Google News<strong>&lt;/title&gt;</strong><br />
<strong>&lt;url&gt;</strong>http://news.google.com/intl/it_it/images/news_res.gif<strong>&lt;/url&gt;</strong><br />
<strong>&lt;link&gt;</strong>http://news.google.it/<strong>&lt;/link&gt;</strong><br />
<strong>&lt;/image&gt;<br />
&lt;item&gt;<br />
&lt;title&gt;</strong>USA: OBAMA ANNUNCIA OGGI NOMINE ENERGIA E AMBIENTE &#8211; La Repubblica<strong>&lt;/title&gt;</strong><br />
<strong>&lt;link&gt;</strong>http://news.google.it/news/url?sa=T&amp;ct=it/0-0&amp;fd=R&amp;url=http://www.repubblica.it/news/ired/ultimora/esteri/rep_esteri_n_3455881.html&amp;cid=1263615727&amp;ei=92pGScbgOJmmwAGz5pzbDg&amp;usg=AFQjCNF0go8PkbUwHKLk9BaKdp8dFCS0hg<strong>&lt;/link&gt;</strong><br />
<strong>&lt;guid isPermaLink=&#8221;false&#8221;&gt;</strong>tag:news.google.com,2005:cluster=http://www.repubblica.it/news/ired/ultimora/esteri/rep_esteri_n_3455881.html<strong>&lt;/guid&gt;</strong><br />
<strong>&lt;pubDate&gt;</strong>Mon, 15 Dec 2008 07:37:02 GMT<strong>&lt;/pubDate&gt;</strong><br />
<strong>&lt;description&gt;</strong>&lt;table border=0 width= valign=top cellpadding=2 cellspacing=7&gt;&lt;tr&gt;&lt;td width=80 align=center valign=top&gt;&lt;font style=&#8221;font-size:85%;font-family:arial,sans-serif&#8221;&gt;&lt;a  href=&#8221;http://news.google.it/news/url?sa=T&amp;ct=it/0i-0&amp;fd=R&amp;url=http://www.instablog.org/ultime/35898.html&amp;cid=1263615727&amp;ei=92pGScbgOJmmwAGz5pzbDg&amp;usg=AFQjCNFqys_EXXw7Kh4xa96o32AB49JHvw&#8221;&gt;&lt;img src=http://news.google.it/news?imgefp=ve3DuBkpQiwJ&amp;imgurl=www.instablog.org/blogpress/art/ultimora/obama.jpg width=80 height=51 alt=&#8221;&#8221; border=1&gt;&lt;br&gt;&lt;font size=-2&gt;The Instablog&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/td&gt;&lt;td valign=top class=j&gt;&lt;font style=&#8221;font-size:85%;font-family:arial,sans-serif&#8221;&gt;&lt;br&gt;&lt;div style=&#8221;padding-top:0.8em;&#8221;&gt;&lt;img alt=&#8221;&#8221; height=&#8221;1&#8243; width=&#8221;1&#8243;&gt;&lt;/div&gt;&lt;div class=lh&gt;&lt;a href=&#8221;http://news.google.it/news/url?sa=T&amp;ct=it/0-0&amp;fd=R&amp;url=http://www.repubblica.it/news/ired/ultimora/esteri/rep_esteri_n_3455881.html&amp;cid=1263615727&amp;ei=92pGScbgOJmmwAGz5pzbDg&amp;usg=AFQjCNF0go8PkbUwHKLk9BaKdp8dFCS0hg&#8221;&gt;USA: &lt;b&gt;OBAMA&lt;/b&gt; ANNUNCIA OGGI NOMINE ENERGIA E AMBIENTE&lt;/a&gt;&lt;br&gt;&lt;font size=-1&gt;&lt;font color=#6f6f6f&gt;La Repubblica -&lt;/font&gt; &lt;nobr&gt;6 ore fa&lt;/nobr&gt;&lt;/font&gt;&lt;br&gt;&lt;font size=-1&gt;Il presidente eletto, Barack &lt;b&gt;Obama&lt;/b&gt;, annuncera&#8217; oggi le nomine del segretario al Dipartimento Energia e dello &#8216;zar&#8217; per l&#8217;Ambiente. Gli annunci, che verranno &lt;b&gt;&#8230;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font size=-1&gt;&lt;a href=&#8221;http://news.google.it/news/url?sa=T&amp;ct=it/0-1&amp;fd=R&amp;url=http://notizie.alice.it/notizie/esteri/2008/12_dicembre/15/usa_obama_incontra_oggi_staff_difesa_e_annuncia_nomine_ambiente,17232675.html&amp;cid=1263615727&amp;ei=92pGScbgOJmmwAGz5pzbDg&amp;usg=AFQjCNHg4RwSRzsrR_uvMvcY3h-S38meRg&#8221;&gt;Usa/ &lt;b&gt;Obama&lt;/b&gt; incontra oggi staff difesa e annuncia nomine ambiente&lt;/a&gt; &lt;font size=-1 color=#6f6f6f&gt;&lt;nobr&gt;Virgilio Notizie&lt;/nobr&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;font size=-1&gt;&lt;a href=&#8221;http://news.google.it/news/url?sa=T&amp;ct=it/0-2&amp;fd=R&amp;url=http://www.agenziami.it/ultime/9415/USA%2BObama%2Bpronte%2Ble%2Bnomine%2Bper%2Bl%2Bambiente/&amp;cid=1263615727&amp;ei=92pGScbgOJmmwAGz5pzbDg&amp;usg=AFQjCNGniMEyAO4lJg5HiWJCKROXee8p_g&#8221;&gt;USA. &lt;b&gt;Obama&lt;/b&gt;, pronte le nomine per l&#8217;ambiente&lt;/a&gt; &lt;font size=-1 color=#6f6f6f&gt;&lt;nobr&gt;(ami) Agenzia Multimediale Italiana&lt;/nobr&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;font size=-1&gt;&lt;a href=&#8221;http://news.google.it/news/url?sa=T&amp;ct=it/0-3&amp;fd=R&amp;url=http://www.instablog.org/ultime/36309.html&amp;cid=1263615727&amp;ei=92pGScbgOJmmwAGz5pzbDg&amp;usg=AFQjCNF64d7ozOXQdd8tBoaRDHWfPlBfsg&#8221;&gt;&lt;b&gt;Obama&lt;/b&gt;: nomine ambiente, oggi gli annunci ufficiali&lt;/a&gt; &lt;font size=-1 color=#6f6f6f&gt;&lt;nobr&gt;The Instablog&lt;/nobr&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;font class=p size=-1&gt;&lt;a class=p href=http://news.google.it/news?hl=it&amp;ned=it&amp;ie=UTF-8&amp;ncl=1263615727&gt;&lt;nobr&gt;e altri 4 articoli simili&lt;/nobr&gt;&lt;/a&gt;&lt;/font&gt;&lt;/div&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<strong>&lt;/description&gt;<br />
&lt;/item&gt;</strong><br />
[...]<br />
<strong>&lt;/channel&gt;<br />
&lt;/rss&gt;</strong></p></blockquote>
<p><span id="more-715"></span><br />
Si può formattare a dovere con un po&#8217; di XSL per pubblicare ad esempio i titoli, rendendoli cliccabili con un link diretto all&#8217;articolo (quello contenuto nel tag &lt;link&gt;).</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;ISO-8859-1&#8243;?&gt;<br />
&lt;xsl:stylesheet version=&#8221;1.0&#8243; xmlns:xsl=&#8221;http://www.w3.org/1999/XSL/Transform&#8221;&gt;<br />
&lt;xsl:template match=&#8221;/rss&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;!&#8211;&lt;link href=&#8221;style.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; /&gt;&#8211;&gt;</p>
<p>&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&#8221;logo&#8221; style=&#8221;border-bottom: 1px solid #ccc; margin-bottom: 5px; font-size: 1.2em; font-weight: bold;&#8221;&gt;<br />
&lt;xsl:element name=&#8221;a&#8221;&gt;<br />
&lt;xsl:attribute name=&#8221;href&#8221;&gt;<br />
&lt;xsl:value-of select=&#8221;channel/link&#8221; /&gt;<br />
&lt;/xsl:attribute&gt;<br />
&lt;xsl:value-of select=&#8221;channel/title&#8221; /&gt;<br />
&lt;/xsl:element&gt;<br />
&lt;/div&gt;<br />
&lt;div class=&#8221;Snippet&#8221;&gt;<br />
&lt;ul style=&#8221;list-style: none; margin: 0; padding:0&#8243;&gt;<br />
&lt;xsl:for-each select=&#8221;channel/item&#8221;&gt;<br />
&lt;li&gt;<br />
&lt;xsl:element name=&#8221;a&#8221;&gt;<br />
&lt;xsl:attribute name=&#8221;href&#8221;&gt;<br />
&lt;xsl:value-of select=&#8221;link&#8221;/&gt;<br />
&lt;/xsl:attribute&gt;<br />
&lt;xsl:value-of select=&#8221;title&#8221;/&gt;<br />
&lt;/xsl:element&gt;<br />
&lt;br/&gt;<br />
&lt;small style=&#8221;color: #ccc; text-align: right&#8221;&gt;&lt;xsl:value-of select=&#8221;pubDate&#8221; /&gt;&lt;/small&gt;<br />
&lt;/li&gt;<br />
&lt;/xsl:for-each&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;footer&#8221; style=&#8221;display: none;&#8221;&gt;<br />
&lt;xsl:value-of select=&#8221;channel/copyright&#8221; /&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
&lt;/xsl:template&gt;<br />
&lt;/xsl:stylesheet&gt;</p></blockquote>
<p>Per semplificare un po&#8217; ho aggiunto qualche regola CSS direttamente in linea, ma nulla vieta di creare un foglio esterno (ho commentato la porzione di codice che richiamerebbe un foglio di stile).<br />
L&#8217;unica vera scocciatura di Google News è che non offre un feed <em>pulito</em>, ma all&#8217;interno del tag &lt;description&gt; inserisce codice html e questo può dare problemi in fase di parsing XML.</p>
<p>Per chi volesse approfondire l&#8217;argomento un buon punto di partenza è <a title="xml - xsl" href="http://xhtml.html.it/guide/lezione/1740/trasformare-xml-introduzione-a-xsl/">questo</a>. Buona lettura.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diplod.it/2008/12/18/un-po-di-xsl-per-processare-un-feed-di-google-news/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
