Page 1 of 1

Beginners Question

Posted: Wed Feb 20, 2013 7:40 pm
by Onyx
Hey there!

thanks for you help in advance!

My Problem: I have an XML maden by myself and I want to use another XML as Schema for it, how to manage that in OxygenXML best?

Cheers,
Onyx!

Re: Beginners Question

Posted: Thu Feb 21, 2013 4:31 pm
by adrian
Hi,

If you have an XML file and want to model and validate another target XML based on the same structure, you can:
  • generate a DTD or an XML schema from your given XML file. You can do this in Oxygen with Tools > Generate/Convert Schema. From the Input section select XML documents and browse for the input XML file (you can add several files for better accuracy), choose the Output type (XML 1.0 DTD or W3C XML Schema) and choose the output file name.
  • Associate the newly created DTD/schema with your target XML file. Open the XML file and associate the schema: Document > Schema > Associate Schema, browse for the schema and press OK. The XML will be modified to include the association with the schema (DOCTYPE declaration of DTD or schemaLocation attribute for XSD).
After this you will have validation and content completion in the target XML from the generated DTD/schema.

Regards,
Adrian