Validating xsd

Here's a blog entry showing how that is done: If you are generating XML files programatically, you may want to look at the XMLBeans library.

You should not use the DOMParser to validate a document (unless your goal is to create a document object model anyway). Here's an example that validates an XML file against any XSD's it references (even if it has to pull them from the network): You can avoid pulling referenced XSD's from the network, even though the xml files reference url's, by specifying the xsd manually (see some other answers here) or by using an "XML catalog" style resolver. is probably a network location, so it'll go out and hit the network with each and every validation, not always optimal.In the following example, we will create two versions of an XML sample resource file (and sc-not Valid.xml) to be validated against a schema file named Spring apparently also can intercept the URL requests to serve local files for validations.As for a tool to do this for you, XMLFox seems to be a decent freeware solution, but not having used it personally I can't say for sure.

You must have an account to comment. Please register or login here!