Reading XML from Stream
问题 I'm working with ASP.NET, and am importing an XML file from a form. Right now I convert that into a Stream : Stream inputStream = XmlFileUploadControl.PostedFile.InputStream; because I may need this version later. I'd like to first check to make make sure that the XML file has the correct format, and, if it is, then display some information: if (CorrectFileFormat(inputStream)) { DisplayLicenseInfo(inputStream); } else { StatusLabel.Text = "Selected file is not a LicensingDiag XML file"; } The