|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
XML Document Literal
A literal representing an XDocument object.
<?xml version="1.0" [encoding="encoding"] [standalone="standalone"] ?> [ piCommentList ] rootElement [ piCommentList ]
An XML document literal is identified by the XML declaration at the start of the literal. Although each XML document literal must have exactly one root XML element, it can have any number of XML processing instructions and XML comments.
An XML document literal cannot appear in an XML element.
An XML literal can span multiple lines without using line continuation characters. This enables you to copy content from an XML document and paste it directly into a Visual Basic program.
The following example creates an XML document that has an XML declaration, a processing instruction, a comment, and an element that contains another element.