XML Schema Explorer
Introduction
Now with the XML momentum, is very important to generate a valid XMLs against a XML Schema. The siblings order or the required elements can produce us a big headache. The first step is to review the schema definition, and there are a lot of tools that can help, but when we need to generate a XML file programatically, we need and API to solve this kind of problems.
My first try was generate a XML from the Schema definition, but with a Schema you can generate a lot of differents XMLs. The choices, sequences and the recursive parts make imposible to get a universal file. You can generate one of the posibilities, but not all.
Other way is to parse the .xsd file with xpath, but this would be a very complex task.
The natural way is to use the Schema definition to browse it and one APIs that can do it is Eclipse XSD.
Other API is XSOM XML Schema Object Model. I’ve not tested it, but if any of you have done, please send me your experiences.
If any of you know other APIs, please report me. I didn’t find other APIs.
First, i recoment to read the XML Schema specs at http://www.w3.org/TR/xmlschema-0/, it seems to be a hard task, but despite you can edit a .xsd file with high level tools like Eclipse WTP, always is a good idea make your first by hand. Reading the specs you have a complete review of all posibilities.
Comments(0)