VB XML Cookbook, Recipe 7: Enumerating Large XML Files (Doug Rothaus)

VB XML Cookbook, Recipe 7: Enumerating Large XML Files (Doug Rothaus) It’s been a while since I wrote one of these XML cookbook entries. Here’s some info on a common problem: Really big XML files. I’m going to show you two things in this recipe. The first is a tip on reading very large XML… Read more

VB XML Cookbook, Recipe 6: Writing an XSLT Transform in VB (Doug Rothaus)

Most XSLT programmers are familiar with this XSLT transform to copy an XML file. <?xml version=“1.0“ encoding=“utf-8“?> <xsl:stylesheet version=“1.0“ xmlns:xsl=“http://www.w3.org/1999/XSL/Transform“>     <xsl:output method=“xml“ indent=“yes“/>       <xsl:template match=“@* | node()“>         <xsl:copy>             <xsl:apply-templates select=“@* | node()“/>         </xsl:copy>     </xsl:template> </xsl:stylesheet> This XSLT is commonly used for identity transforms as it allows you to… Read more

VB XML Cookbook, Recipe 5: The “Halloween” Problem (Doug Rothaus)

In the last two XML cookbook entries, we talked about the technique of using the ReplaceWith method to perform an identity transform. While this technique may meet your needs, it can introduce a problem in your code commonly referred to as the “Halloween” problem. Let’s take a look at what the problem is, and how… Read more

VB XML Cookbook, Recipe 4: Get Inner XML from the Nodes Property (Doug Rothaus)

Recipe 3 showed one way to work with mixed XML content using the XML Descendant axis property and the ReplaceWith method. This is one way to do an identity transform and we’ll look at another method in a later post. There is a key capability not mentioned in Recipe 3 that you will need for… Read more

VB XML Cookbook, Recipe 3: Identity Transforms (Doug Rothaus)

An identity transform in XSLT does just what the name implies: replace the identity of an element or attribute with a new identity. Identity transforms are especially critical when dealing with XML markup that is less rigid in its structure. Consider a documentation structure for news articles. Whenever a title is referred to within an… Read more