XmlReader.Create Method (String, XmlReaderSettings, XmlParserContext)
Assembly: System.Xml (in System.Xml.dll)
'Declaration Public Shared Function Create ( _ inputUri As String, _ settings As XmlReaderSettings, _ inputContext As XmlParserContext _ ) As XmlReader
- Type: System.String
The URI for the file containing the XML data. The XmlResolver object on the XmlReaderSettings object is used to convert the path to a canonical data representation. If XmlResolver is Nothing, a new XmlXapResolver object is used. For more information, see the Remarks section below.
- Type: System.Xml.XmlReaderSettings
The XmlReaderSettings object used to configure the new XmlReader instance. This value can be Nothing.
- Type: System.Xml.XmlParserContext
The XmlParserContext object that provides the context information required to parse the XML fragment. The context information can include the XmlNameTable to use, encoding, namespace scope, the current xml:lang and xml:space scope, base URI, and document type definition.
This value can be Nothing.
The inputUri value is Nothing.
The XmlReader does not have sufficient permissions to access the location of the XML data.
The file specified by the URI cannot be found.
The URI format is not correct.
The inputUri parameter contains the URI to the XML file. This file must be located in the application's XAP resource, unless the XmlResolver has been changed to something other than XmlXapResolver. If you want to download the file from some other location, you must do the following:
Download the data. To do this, initiate an asynchronous request by using HttpWebRequest.
For a code example, see How to: Load an XML File from an Arbitrary URI Location with LINQ to XML.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.