<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>XML</title>
        <link>http://blogs.ugidotnet.org/franx_blog/category/XML.aspx</link>
        <description>XML</description>
        <language>it-IT</language>
        <copyright>Francesco Geri</copyright>
        <generator>Subtext Version 2.6.0.0</generator>
        <item>
            <title>Open XML Format SDK</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2008/04/17/92265.aspx</link>
            <description>&lt;p&gt;Pubblicato l'Open XML Format SDK (April CTP):&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyId=AD0B72FB-4A1D-4C52-BDB5-7DD7E816D046&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=AD0B72FB-4A1D-4C52-BDB5-7DD7E816D046&amp;amp;displaylang=en" target="_blank"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=AD0B72FB-4A1D-4C52-BDB5-7DD7E816D046&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Mentre la versione online dell'SDK è all'indirizzo:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://msdn2.microsoft.com/en-us/library/bb448854.aspx" href="http://msdn2.microsoft.com/en-us/library/bb448854.aspx" target="_blank"&gt;http://msdn2.microsoft.com/en-us/library/bb448854.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Fonte: &lt;a title="Erika Ehrli" href="http://blogs.msdn.com/erikaehrli/archive/2008/04/17/announcing-the-open-xml-format-sdk-april-ctp.aspx" target="_blank"&gt;Erika Ehrli&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/92265.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2008/04/17/92265.aspx</guid>
            <pubDate>Thu, 17 Apr 2008 19:45:52 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2008/04/17/92265.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/92265.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Trasformazione di un file XML in un file HTML tramite un XSLT</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2008/04/02/92024.aspx</link>
            <description>&lt;p&gt;La trasformazione via codice di un file XML in HTML tramite file XSLT è molto semplice (cito liberamente da &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/system.xml.xsl.xslcompiledtransform.aspx"&gt;MSDN&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;' Load the style sheet.&lt;br /&gt;Dim xslt As New XslCompiledTransform()&lt;br /&gt;xslt.Load("output.xsl")&lt;br /&gt;        &lt;br /&gt;' Execute the transform and output the results to a file.&lt;br /&gt;xslt.Transform("books.xml", "books.html")&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Il codice riportato lavora su file fisici, messi da qualche parte. &lt;br /&gt;
Se però non si vuole sfruttare il file system, si può usare una funzione come la seguente, che consente di fare la trasformazione senza aver file fisici in gioco.&lt;/p&gt;
&lt;p&gt;  &lt;/p&gt;
&lt;div style="background: white none repeat scroll 0% 50%; font-size: 11pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black; font-family: consolas;"&gt;
&lt;p style="margin: 0px;"&gt;  &lt;span style="color: blue;"&gt;Function&lt;/span&gt; TransformXML(&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; xDoc &lt;span style="color: blue;"&gt;As&lt;/span&gt; Xml.XmlDocument, &lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; xsltText &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;String&lt;/span&gt;) &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;String&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: green;"&gt;' Carica l'xslt&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Dim&lt;/span&gt; xslt &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; Xml.Xsl.XslCompiledTransform()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Dim&lt;/span&gt; xsltStringReader &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; IO.StringReader(xsltText)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Dim&lt;/span&gt; xsltXmlReader &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; Xml.XmlTextReader(xsltStringReader)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    xslt.Load(xsltXmlReader)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: green;"&gt;' Crea il reader per l'XML in XDOC&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Dim&lt;/span&gt; xDocStringReader &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; IO.StringReader(xDoc.OuterXml)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Dim&lt;/span&gt; xDocXmlReader &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; Xml.XmlTextReader(xDocStringReader)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: green;"&gt;' Crea il writer per l'html&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Dim&lt;/span&gt; htmlStringBuilder &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; Text.StringBuilder()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Dim&lt;/span&gt; htmlStringWriter &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; IO.StringWriter(htmlStringBuilder)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Dim&lt;/span&gt; htmlXmlReaderWriter &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; Xml.XmlTextWriter(htmlStringWriter)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: green;"&gt;' Esegue la trasformazione&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    xslt.Transform(xDocXmlReader, htmlXmlReaderWriter)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: green;"&gt;' Retuisce il contenuto html&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Return&lt;/span&gt; htmlStringBuilder.ToString()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;  &lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/92024.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2008/04/02/92024.aspx</guid>
            <pubDate>Wed, 02 Apr 2008 03:55:08 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2008/04/02/92024.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/92024.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Deserializzazione di un oggetto complesso passato come parametro in un WebMethod</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2008/03/17/91743.aspx</link>
            <description>Se in un WebMethod si passa come parametro un oggetto complesso si può ottenere un errore del tipo:

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&gt; System.InvalidOperationException: There was an error generating the XML document. ---&gt; System.InvalidOperationException: A circular reference was detected while serializing an object of type MyObjectType.
   at System.Xml.Serialization.XmlSerializationWriter.Writ&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/91743.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2008/03/17/91743.aspx</guid>
            <pubDate>Mon, 17 Mar 2008 03:40:58 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2008/03/17/91743.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/91743.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Validazione di un file XML dallo schema XSD</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2007/10/25/89218.aspx</link>
            <description>Liberamente tratto da MSDN riporto il codice per la validazione di un file XML da uno schema XSD. &lt;a href="http://blogs.ugidotnet.org/franx_blog/archive/2007/10/25/89218.aspx"&gt;...qui&lt;/a&gt;&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/89218.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2007/10/25/89218.aspx</guid>
            <pubDate>Thu, 25 Oct 2007 20:50:20 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2007/10/25/89218.aspx#feedback</comments>
            <slash:comments>9</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/89218.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>