The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
XElement::Load Method (String^)
.NET Framework (current version)
Loads an XElement from a file.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
Parameters
- uri
-
Type:
System::String^
A URI string referencing the file to load into a new XElement.
Return Value
Type: System.Xml.Linq::XElement^An XElement that contains the contents of the specified file.
This method reads the raw XML into the XML tree. It discards all insignificant white space in the file.
LINQ to XML's loading functionality is built upon XmlReader. Therefore, you might catch any exceptions that are thrown by the XmlReader::Create overload methods and the XmlReader methods that read and parse the document.
Universal Windows Platform
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: