Validating xml without namespace sex dating in bishopton renfrewshire
there would be a statement before the root element.
Xerces, using my Input Source, would only see the cached and rewritten version. If your input files don't have an xmlns=".." attribute on your root element, you could simply add this in in-memory and then give that cached and edited version of the input stream to Xerces.
When you say "/xsd" it means that the URL is relative to the domain from which the XML was retrieved. The xml is generated from our webapp and passed back to the client via Ajax.
However, the question is a) how to format the xml so that it doesn't require the xsi:schema Location=" Schema file:///c://src/xsd/My Schema.xsd" in the xml string OR b) how do I specify the location in the xsi:schema Location tag so that it points to the xsd that is in the webapp, not in local file system.
You've worked out your problem, but if you were originally asking if there's a way to validate an XML file without a schema, then the short answer is no -- at least, the validation will not address the information in a schema (obvious, but when working with the XML parsers, this stuff is not always clear).
You can, however, use XML without validating it against a schema.
Probably the reason that it's working so far is that you aren't actually validating the file against the file, so the fact that the file hasn't been put into a directory in your webapp named "/xsd" is okay.
As soon as someone tries to validate the file, then they'll get an error, if the file does not exist at that URL.
Few of them are mentioned below : Microsoft's Visual Studio . Net is primarily handled by the class code present in the following namespaces : Xml Schema Validation An Xml File is generally validated for its conformance to a particular schema.