Showing results for XML - Visual Basic Blog

Jun 9, 2010
0
0

Removing duplicate namespaces in XML Literals (Shyam Namboodiripad)

VBTeam
VBTeam

A common problem that one often runs into with XML literals and the LINQ to XML API is duplicate XML namespaces. Consider the following example. The code imports a default XML namespace - “hello”.Code: Imports <xmlns="hello"> Module Module1     Sub Main()         Dim x = <A> ...

Jun 7, 2010
0
0

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

VBTeam
VBTeam

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 files while still being able to use XML Axi...

May 24, 2010
0
0

Using HTML entities in XML Literals (Avner Aharoni)

VBTeam
VBTeam

One of the common use-cases of XML literals is creating HTML. However, HTML entities cannot be used in XML literals since LINQ to XML directly supports only the Data type definitions (DTD) defined in the XML 1.0 spec. You can read more about it here. The workaround is to use the Unicode representation of the entity, although it’s not as readable ...

Mar 26, 2010
0
0

Editing XML Literals Embedded Expressions in Visual Basic 2010 (Avner Aharoni)

VBTeam
VBTeam

The implicit line continuation feature in Visual Basic 2010 provided an opportunity to improve the code editing experience in XML literals embedded expressions. In Visual Studio 2008, pressing Enter inside an embedded expression would result in the cursor being positioned to the left of the end embedded expression tag. In Visual Studio 2010, pressi...

Jan 20, 2010
0
0

Fun With Dynamic Objects (Doug Rothaus)

VBTeam
VBTeam

A while back, I remember being asked if there was a simple way to expose a source XML document as an object with properties. That is, if the root XML element had a child element <Name>Doug</Name>, then the object would have a Name property that was a string and returned “Doug”. The catch was that the XML document did not con...

Nov 7, 2009
0
0

Linking Zune media items with LinQ, Part 2 (Matt Gertz)

Anthony D. Green [MSFT]
Anthony D. Green [MSFT]

In this post, I’ll continue on with coding the new playlist shuffler.  If you haven’t read part 1 yet, I highly recommend it so that this post will make more sense. JCode for the controls (continued)The Title TextBoxWhen the title changes, we’ll want to indicate that the playlist has changed, and we’ll want to cache the...

Nov 6, 2009
0
0

Linking Zune media items with LinQ, Part 1 (Matt Gertz)

Anthony D. Green [MSFT]
Anthony D. Green [MSFT]

Way back in October 2007, I wrote up a few posts (here and here) on my experiments with the Windows Media Player object model.  The problem I was trying to solve was that, when I had a playlist set to “shuffle,” WMP would break up songs that should always play together (for example, Jackson Browne’s “The Load-Out”...

May 2, 2009
0
0

XML Literals, WCF and LINQ Article by Steele Price (Lisa Feigenbaum)

Lisa Feigenbaum
Lisa Feigenbaum

Steele wrote a great article in last month's issue of Visual Studio Magazine on XML Literals, WCF and LINQ. He shows how to use these three technologies together to produce more responsive ASP.NET pages, and more readable code. Lots of great tips for VB 2008.VSM's "On VB" Column: XML Literals, WCF and LINQ by Steele Price

May 1, 2009
0
0

.NET Rocks! with Beth Massi on the Open XML SDK and XML Literals (Lisa Feigenbaum)

Beth Massi
Beth Massi

Beth Massi shot a couple of great episodes last month on dnrTV! If you are interested in learning more about the Open XML SDK, and how to easily access it using VB.NET XML Literals, be sure to check them out. dnrTV Show #137: Beth Massi on the Open XML SDK Our good friend Beth Massi returns to dnrTV to introduce us to the Open XML SDK, Microsof...