Visual Basic Blog

A group blog from members of the VB team

Using HTML entities in XML Literals (Avner Aharoni)

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 ...