XML literals are a feature of VB.NET, not C#.
What you have posted is as close as you can get in C#.
You may want to consider replacing the embedded double quotes with single quotes though (as both types are valid XML).
For larger amounts of XML you may want to consider the answer from Marc – using an XML file (loaded once and stored in memory), so you can take advantage of the XML editor.
Related Contents:
- find line number of specific tag of xml file [duplicate]
- How does one parse XML files? [closed]
- How do I read and parse an XML file in C#?
- Can I escape a double quote in a verbatim string literal?
- Memory Leak using StreamReader and XmlSerializer
- How to apply an XSLT Stylesheet in C#
- Validating an XML against referenced XSD in C#
- SelectSingleNode returns null when tag contains xmlNamespace
- Read XML Attribute using XmlDocument
- What is the best way to parse (big) XML in C# Code?
- XML Serialization and Inherited Types
- Why some types do not have literal modifiers
- How do you remove invalid hexadecimal characters from an XML-based data source prior to constructing an XmlReader or XPathDocument that uses the data?
- DataContract XML serialization and XML attributes
- Reading data from XML [duplicate]
- Appending an existing XML file with XmlWriter
- How to read attribute value from XmlNode in C#?
- .net XML Serialization – Storing Reference instead of Object Copy
- Getting attribute value of an XML Document using C#
- Why doesn’t XmlSerializer support Dictionary?
- What is the difference between Linq to XML Descendants and Elements
- How to create a XSD schema from a class?
- The ‘:’ character, hexadecimal value 0x3A, cannot be included in a name
- how to read all files inside particular folder
- How to parse very huge XML Files in C#? [duplicate]
- How to prevent blank xmlns attributes in output from .NET’s XmlDocument?
- XPATHS and Default Namespaces
- How to deserialize XML if the return type could be an Error or Success object
- Reading embedded XML file c#
- get line number for XElement here
- How to serialize/deserialize simple classes to XML and back
- How to check if a file exists in a folder?
- Adding elements to an xml file in C#
- Edit specific Element in XDocument
- How can I serialize internal classes using XmlSerializer?
- How to convert JSON to XML or XML to JSON in C#?
- How to read HTML as XML?
- Wrap properties with CData Section – XML Serialization C#
- Error: “The node to be inserted is from a different document context”
- Read a XML (from a string) and get some fields – Problems reading XML
- Update XML with C# using Linq
- How to create XmlElement attributes with prefix?
- How can I write xml with a namespace and prefix with XElement?
- Deserializing XML File with multiple element attributes – attributes are not deserializing
- XmlTextReader vs. XDocument
- How to prevent System.Xml.XmlException: Invalid character in the given encoding
- Convert Dataset to XML
- Xml Comparison in C#
- How do I get the XML root node with C#?
- Open XML SDK 2.0 – how to update a cell in a spreadsheet?