| By :
Jamie Simpson
An XML editor can help you create and edit valid XML documents more quickly and easier than if you rely on a general text editor to do the job. You'll always be able to do the same thing without an XML editor, but the editor provides some extra functionality that can help. At the simplest, the editor might offer syntax highlighting or coloring, to help you see the wood for the trees as you're navigating around your XML document. It might show XML tags, attribute names and values each in a specific color, leaving the rest of the document in the usual black. The XML editor will usually allow you to format or reformat the XML document by indenting lines consistently, to help you and others read the document more easily and to understand its structure. XML editors can usually generate end tags when you create start tags, to save you a little typing. They might also be able to show you where the start tag is for a particular end tag, in case you get a little lost. Everything mentioned so far can be done without the editor having access to the DTD (Document Type Definition) or other XML schema for the document. If the editor can download the schema - which it might be able to do if you've referenced it the document - it will be able to validate the document, telling you where the XML doesn't meet the schema's requirements. Some XML editors will automatically validate the document as you type, so you'll know as soon as you've made a mistake. An XML editor with access to the schema will usually use it to help you create the content in the first place. The editor can automatically complete tags you're typing, and create any required attributes, to save you some typing and to help you avoid information required in the XML document. Depending on the nature of the XML document, an XML editor can provide some other, even more powerful features. If the XML document you're editing is destined to be formatted using CSS, as will be the case if you're editing a web page in XHTML, for example, the editor might offer WYSIWYG ("What You See Is What You Get") functionality, allowing you to edit the document as it will look when the CSS is applied. If you're using the XML editor to prepare data that is more rigidly structured, it might allow you to create and edit the data in straightforward form fields rather than editing the XML itself. For example, if you're editing the data for a bus timetable, you might be shown a form for each route, and be able to select dates using a calendar widget, and times using drop-down menus. So in summary, an XML editor can help make creating and editing valid XML documents quicker and easier, avoiding you having to go back and add required data and attributes, or fix things you didn't get quite right.
|