If not, is there any way to check the XML document against it’s XSD?
Share
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.
XMLHttpRequest is just a method name, the content doesn’t have to be XML (which is why it is commonly used with JSON and serialised forms). An XML parser will usually only check that the XML is valid, not whether it conforms to a particular schema or DTD. I doubt that any browser XML parser does.
If you want to check against a schema or DTD, you need an XML validator such as the one in XMLSpy. As Harun has posted, you might be able to access a host object that will do validation but it most likely will not be cross-browser.