Validating XML Documents

At any time, you can validate your XML document against its schema. Click Validate Document in the window of the document you want to validate.

Stylus Studio displays a message that indicates whether or not your document is valid. If your document does not conform to its schema, Stylus Studio displays a list of error messages that describe the inconsistencies. This list includes line and column numbers that indicate the location of the error. When you click in an XML document, Stylus Studio shows the line and column number in the bottom right corner of the Stylus Studio window.

When Stylus Studio validates a document, it also checks for well-formedness.

Stylus Studio uses font color to indicate valid and invalid element names. Purple fonts indicate valid elements. Orange fonts indicate elements that are not in the schema.

Note

 

Stylus Studio uses Apache's Xerces XML Parser to validate XML documents. Error messages about invalid documents are generated by the Xerces XML Parser. Stylus Studio has no control over the contents of these messages. If you have trouble understanding such a message, try searching the W3C XML Schema Recommendation for the main phrase in the error message.

 
Free Stylus Studio XML Training: