When editing XML using oXygen XML Editor, you can check the validity of your XML document against a schema without needing to leave the application. Once a schema is associated with an XML document, oXygen will check the contents of your document against the schema and indicate any errors in the markup, which can be helpful when creating and editing XML markup.
- To start the process of associating a schema with an XML document, in the menu bar,
Click Document, Point Schema, Click Associate Schema…
- To associate a schema file located on your computer, to the right of the URL field in the Associate Schema dialog box,
Click
- To select the schema file to associate with the XML document, in the Open dialog box,
navigate to where the schema file is located on your computer, Double-Click the file
- If necessary, to choose the type of schema you're associating with the document, in the Schema Type dropdown,
Click, Click the type of schema you're using
- To finish associating the schema with the XML document, in the bottom right corner of the Associate Schema dialog box,
Click
Now that we've associated the schema with the XML document, oXygen should automatically tell you if the document doesn't follow the rules laid out in the schema as you're editing the document - however, you can also manually validate the document if desired.
- To validate the XML document, in the toolbar near the top of the screen,
Click
- To validate the XML document, in the toolbar near the top of the screen,
If the document validates successfully, in the status bar at the bottom of the oXygen window, you should see the following message:
If oXygen detects any errors, the Problems panel will appear at the bottom of the screen with a list of the issues it found and their locations in the document, like in the following example:
After fixing an issue listed in the Problems panel, it will disappear from the list. When all issues have been fixed, the validation status at the bottom of the window will display the message "Validation successful", indicating there are no errors in your document and your XML is valid.