If I have a large (>500MB) XML file to validate, does an XmlReader bring the whole thing into memory to perform validation?
I looked at Validating an XML against referenced XSD in C# for validation procedure.
thanks,
Mark
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, if you use
XmlValidatingReader(orXmlReaderwith appropriate settings) it won’t load the whole XML file. The method described in the question usesXmlDocumentclass which does load the whole file. The accepted answer doesn’t load the entire file so you’ll be fine using it.