MatthewRed Posted August 31, 2006 Share Posted August 31, 2006 Hey there,My company uses a *somewhat* xml and schema liike format for many of their data and configuration files. It is my task to write a converter to valid and qualified xml and xsd files.My question (premise): looking within the xml files (under Referencing a Schema in an XML Document), there is a part "<note xmlns="http://www.w3schools.com"".'>http://www.w3schools.com"". I understand that this is the namespace which the root element, and all child elements operate under. Further, there is a "xsi:schemaLocation="http://www.w3schools.com" attribute. Note that these are only relevant code fragments.Further, within the schema there is a "targetNamespace="http://www.w3schools.com"" and a "xmlns="http://www.w3schools.com"" set of attributes within the root element of the schema file (all this stuff is taken from the link above).My question (actual): which of these need to match? I am not abundantly clear what the default namespace in the schema file is for, or the default namespace expressed in the schemaLocation attribute, w3schools doesn't explain it too clearly and I cannot yet find a clear reference on the subject.Thanks in advance- Link to comment Share on other sites More sharing options...
MatthewRed Posted September 1, 2006 Author Share Posted September 1, 2006 So aparently there is a seperate application of sorts I need to aquire to validate my xml file against my schema, a "schema validator". Does anyone know of one I can integrate into a c++ application? Link to comment Share on other sites More sharing options...
MatthewRed Posted September 18, 2006 Author Share Posted September 18, 2006 Xerces, by Apache is an adequate solution to parsing an xml file into a DOM. It supports validation. Take apart the DOMPrint example and it demonstrates a simple solution. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now