<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>VB XML Cookbook, Recipe 1: XML Transformations using XML Literals (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx</link><description>I was working on a blog entry about replacing XSLT transforms with Visual Basic XML Literals. As the entry progressed, I noticed that it was really, really long. So, Avner Aharoni and I talked things over and we decided to break it up into multiple entries</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Conociendo las novedades de Visual Basic y XML con Visual Basic 2008</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8004505</link><pubDate>Mon, 03 Mar 2008 19:08:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8004505</guid><dc:creator>Jorge Serrano - MVP Visual Developer - Visual Basic</dc:creator><description>&lt;p&gt;Despu&amp;#233;s de la serie de art&amp;#237;culos publicados por el equipo de Visual Basic sobre el aprendizaje de LINQ&lt;/p&gt;
</description></item><item><title>re: VB XML Cookbook, Recipe 1: XML Transformations using XML Literals (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8084848</link><pubDate>Fri, 07 Mar 2008 06:05:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8084848</guid><dc:creator>Alessandro Bologna</dc:creator><description>&lt;p&gt;Thanks for your examples, they clarify the appealing aspect of this approach.&lt;/p&gt;
&lt;p&gt;But I am not fully convinced that this approach can replace XSLT at all.&lt;/p&gt;
&lt;p&gt;For instance, how do you implement the identity transformation pattern? It's a very commonly used way in XSLT tp modify only parts of a document of you which you know little to start with. For instance, if the source document is an XHTML page, replacing all the instances of &amp;lt;br/&amp;gt; with &amp;lt;p&amp;gt;text&amp;lt;/p&amp;gt;.&lt;/p&gt;
&lt;p&gt;The &lt;/p&gt;
&lt;p&gt;And, can you write code that parses this code? One of the many reasons why XSLT is useful is the ability to process itself, since its grammar is an XML application. &lt;/p&gt;
&lt;p&gt;I have the feeling that parsing the VB/XML literals/LINQ above would not be as easy. &lt;/p&gt;
&lt;p&gt;I realize that XSLT meta programming could be considered an &amp;quot;advanced&amp;quot; technique, but as a matter of fact becomes very useful as your code base grows. &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Alessandro&lt;/p&gt;
</description></item><item><title>re: VB XML Cookbook, Recipe 1: XML Transformations using XML Literals (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8138042</link><pubDate>Tue, 11 Mar 2008 00:31:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8138042</guid><dc:creator>VBTeam</dc:creator><description>&lt;p&gt;It's pretty simple to implement an identity transform pattern to do things like replace nodes. Your example of replacing all of the break nodes in an XHTML page with paragraphs could be as simple as a LINQ query to return the &amp;lt;br/&amp;gt; elements, then a call to the ReplaceWith method for each element and supply the new XML Literal (&amp;lt;p&amp;gt;Test&amp;lt;/p&amp;gt;). For example...&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim xhtmlDoc = XDocument.Load(xhtmlFilePath)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim breaks = (From element In xhtmlDoc.&amp;lt;html&amp;gt;...&amp;lt;br&amp;gt;).ToList()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;For Each break In breaks&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break.ReplaceWith(&amp;lt;p&amp;gt;Test&amp;lt;/p&amp;gt;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Next&lt;/p&gt;
&lt;p&gt;Regarding parsing, true, you can't have XML Literals parse VB code like you can have XSLT parse itself. That is a nice advantage for management of a large code base.&lt;/p&gt;
</description></item><item><title>VB XML Cookbook, Recipe 2: Descendants and Ancestors (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8336136</link><pubDate>Tue, 25 Mar 2008 20:23:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8336136</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;This entry in the cookbook shows how you can access descendant and ancestor elements in an XML document&lt;/p&gt;
</description></item><item><title>VB XML Cookbook, Recipe 3: Identity Transforms (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8424531</link><pubDate>Fri, 25 Apr 2008 21:22:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8424531</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;An identity transform in XSLT does just what the name implies: replace the identity of an element or&lt;/p&gt;
</description></item><item><title>VB XML Cookbook, Recipe 4: Get Inner XML from the Nodes Property (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8472783</link><pubDate>Thu, 08 May 2008 19:42:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8472783</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;Recipe 3 showed one way to work with mixed XML content using the XML Descendant axis property and the&lt;/p&gt;
</description></item><item><title>VB XML 料理ブック レシピ 1 : XML リテラルを使用した XML 変換 (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8576992</link><pubDate>Fri, 06 Jun 2008 08:19:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8576992</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;Visual Basic XML リテラルを使用した XSLT 変換の置き換えに関するブログを書いていたのですが、あまりにも長くなってしまいました。そこで Avner Aharoni と話し合って、いくつかのエントリに分割してシリーズ物にすることにしました。数か月前に始まった&lt;/p&gt;
</description></item><item><title>VB XML 料理ブック レシピ 2 : 子孫と先祖 (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8588920</link><pubDate>Tue, 10 Jun 2008 09:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8588920</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;料理ブックのこのレシピでは、 XML ドキュメント内の子孫要素と先祖要素に Visual Basic 、 XML 軸プロパティ、および LINQ to XML オブジェクトを使用してアクセスする方法を紹介します。&lt;/p&gt;
</description></item><item><title>VB XML 料理ブック レシピ 3 : ID 変換 (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8614744</link><pubDate>Wed, 18 Jun 2008 09:56:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8614744</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;XSLT の ID 変換は、その名称が示すとおり、ある要素または属性の ID を新しい ID で置き換えます。 ID 変換は、構造があまり固定されていない XML マークアップを操作するときに特に重要です。ニュース記事の文書構造を考えてみましょう。タイトルが記事内で参照されると、そのタイトルは斜体で強調表示されます。ただし、その記事の&lt;/p&gt;
</description></item><item><title>VB XML 料理ブック レシピ 4 : Nodes プロパティから内部 XML を取得する (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8614835</link><pubDate>Wed, 18 Jun 2008 10:14:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8614835</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;「 レシピ 3 」では、混在 XML コンテンツを XML 子孫軸プロパティ と ReplaceWith メソッドを使用して操作する 1 つの方法を紹介しました。これは ID 変換の 1 つの方法であり、今後の投稿で別の方法を取り上げます。完全に機能する&lt;/p&gt;
</description></item><item><title>VB XML Cookbook, Recipe 6: Writing an XSLT Transform in VB (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#8978929</link><pubDate>Tue, 07 Oct 2008 01:14:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8978929</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;Most XSLT programmers are familiar with this XSLT transform to copy an XML file. &amp;amp;lt;? xml version =&lt;/p&gt;
</description></item><item><title>VB XML Cookbook, Recipe 6: Writing an XSLT Transform in VB (Doug Rothaus)</title><link>http://blogs.msdn.com/vbteam/archive/2008/02/21/vb-xml-cookbook-recipe-1-xml-transformations-using-xml-literals-replacing-xsl-for-each-doug-rothaus.aspx#9008830</link><pubDate>Tue, 21 Oct 2008 09:56:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9008830</guid><dc:creator>VB Feeds</dc:creator><description>&lt;p&gt;Most XSLT programmers are familiar with this XSLT transform to copy an XML file. &amp;amp;lt;? xml version =&lt;/p&gt;
</description></item></channel></rss>