To facilitate the editing of XML a markup language editor used with advanced functionality .
A D V E R T I S E M E N T
This could be done in plain text editor such as Vim, with all the code visible.
Specific XML editors, however, have facilities like menus,word-completion and buttons for tasks that are common in XML editing, based on data supplied with DTD.
There are also graphical XML editors that present the content to the user in a more user-friendly format, approximating the rendered version and hide the code in the background.
This is helpful for situations where people who are not fluent in XML code need to enter information in XML based documents such as expenditure reports and time sheets.And even if the user is familiar with XML, use of such editors, that take care of syntax details, is often faster and more convenient.
These are often called WYSIWYG editors, but not all of them are WYSIWYG: graphical XML editors can be WYSIWYG (when they try to display the final rendering) or WYSIWYM (when they try to display the actual meaning of XML elements).
Features of Editors:
XML editors provide a number of features, despite of the way in which they edit the XML document. Some XML editors have the ability to validate a document against its DTD or schema, and some can do it as the document is being edited in real time. Others provide for the ability to run series of XSLT transforms, over a document.
Some of the larger XML packages include XSLT debugging features and XSL-FO processors for generation PDF files from documents.
XML Text editor
XML Text editors generally provide features dealing with working with element tags.
Syntax highlighting is a basic standard of any XML editor; that is, they display element text color differently from regular text.
Attribute and Element completion based on a DTD or schema is also available from many text XML editors.
Displaying line numbers is also a common and useful feature, as is providing the ability to reformat a document to conform to a particular style of convention.
The main advantage of text editors is that they present exactly the information that is stored in the XML file.
It is the best way to do low-level operations (such as a find/replace on element names), to control the formatting of the file (such as indentations) and to edit XML files without any schema or configuration file.
Graphical editors
Graphical editors are based on Graphics user Interface, may be easier for some
people to use than text editors, and may not require knowledge
of XML syntax. When they are not WYSIWYG, they do not display
the graphical end result of a document, but
instead focus on conveying the meaning of the text, They use DTD or XML schemas or configuration files to map XML elements to graphical components.
These kinds of editors are generally more useful for XML
languages for data rather than for storing documents. Documents
tends to be fairly freeform in structure, which tends to defy
the generally rigid nature of many graphical editors.
configuration files and Schema information can also be used to ensure
that users do not create invalid documents. For instance, in a
text editor, it is possible to create a row with too many cells
in the table, while this would not be possible with the above
graphical user interface.
WYSIWYG editors
WYSIWYG editors edit files directly with the tags
represented by some form of graphical viewing rather than uncovered
XML code. Often, WYSIWYG editors attempt to copy the end
result of some transform or CSS stylesheet application. This
emulation may or may not be possible, depending on the
transformation from XML into the end result.
Adolescent use of a WYSIWYG editor can lead to the creation of
documents that do not have the intrisic semantics of the
particular XML language. This comes about if the user is focused
on trying to achieve a certain visual presentation with the
editor, rather than using the WYSIWYG to make editing the
document easier. For instance, someone creating a web page could
use a H2 element instead of H1 because it looks smaller on their
current WYSIWYG editor. Such an author is making a choice based
on the apparent visual representation, but a visitor to the
author's web page can offer a very different rendering in their
browser.
However, as long as the underlying meaning of the document is
understood by the author, and the author does not make decisions
based on the exact look in the WYSIWYG editor, such an editor
can be of value to the writer. It is generally much easier to
read a document that is being rendered in some fashion than it
is to read the raw XML code. Also, editing can be much more
intuitive, as the WYSIWYG editor can use tools similar to many
word processing applications. Some WYSIWYG editors even allow
the user to use a DTD or Schema and define their own user
interface for editing.
Usually WYSIWYG editors support CSS but not XSLT, because XSLT
transformations can be very complex, and guessing what the user
meant when changing the end result can be impossible
Why Notepad not recommended?
Many web developers use Notepad to edit both HTML,CSS and XML
documents because it is included with the most common OS
and it is simple to use.
But when you use Notepad for XML editing, you will soon run
into problems.
Notepad does not know that you are writing XML, so it will
not be able to assist you.