XML editor
Encyclopedia
An XML editor is a markup language
editor with added functionality to facilitate the editing
of XML
. This can be done using a plain text
editor
, with all the code visible, but XML editors have added facilities like tag completion
and menus and buttons for tasks that are common in XML editing, based on data supplied with document type definition
(DTD) or the XML tree.
There are also graphical XML editors that hide the code in the background and present the content to the user in a more user-friendly format, approximating the rendered
version or editing forms. This is helpful for situations where people who are not fluent in XML code need to enter information in XML based documents such as time sheets and expenditure reports. And even if the user is familiar with XML, use of such editors, which take care of syntax details, is often faster and more convenient.
or XML DTD, and some can do it as the document is being edited in real time.
Other features of an editor designed specifically for editing XML might include element word completion and automatic appending of a closing tag whenever an opening tag is entered.
These features can help to prevent typographically originating errors in the XML code.
Some XML editors provide for the ability to run an XSLT
transform, or series of transforms, over a document. Some of the larger XML packages even offer XSLT debugging features and XSL-FO processors for generation of PDF files from documents.
is a basic standard of any XML editor; that is, they color element text differently from regular text. Element and attribute completion based on a DTD or schema is also available from many text XML editors. Displaying line number
s is also a common and useful feature, as is providing the ability to reformat a document to conform to a particular style of indenture
.
Here is an example of edition in a text editor with syntax coloring:
The advantage of text editors is that they present exactly the information that is stored in the XML file. It is the best way to control the formatting of the file (such as indentations), to do low-level operations (such as a find/replace on element names) and to edit XML files without any schema or configuration file.
("What You See Is What You Get") editors, but not all of them are WYSIWYG: graphical XML editors can be WYSIWYG when they try to display the final rendering or WYSIWYM
("What You See Is What You Mean") when they try to display the actual meaning of XML elements. When they are not WYSIWYG, they do not display the (or one of the) graphical end result of a document, but instead focus on conveying the meaning of the text. They use DTDs or XML schemas and/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 tend to be fairly free-form in structure, which tends to defy the generally rigid nature of many graphical editors.
In the above example, the editor is using a configuration file to know that the TABLE element represents a table, the TR element represents a row of the table, and the TD element represents a cell of the table. It is using this information to display the table based on this structuring information, in order to make editing easier.
Schema and configuration files 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.
stylesheet application. This emulation may or may not be possible, depending on the transformation from XML into the end result.
Naive use of a WYSIWYG editor can lead to the creation of documents that do not have the intrinsic 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 an H2 element (meaning: second level title) instead of H1 (meaning: first level title) 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. The WYSIWYG editors that do support XSLT, such as Syntext Serna
, will therefore apply changes directly to the original XML, while updating the view by running the XSLT for every change.
In the above example, a stylesheet is used to color table cells in a particular way. For instance, even rows do not have the same background color as odd rows, in order to make reading easier.
Edited formats
Markup language
A markup language is a modern system for annotating a text in a way that is syntactically distinguishable from that text. The idea and terminology evolved from the "marking up" of manuscripts, i.e. the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts...
editor with added functionality to facilitate the editing
Editing
Editing is the process of selecting and preparing written, visual, audible, and film media used to convey information through the processes of correction, condensation, organization, and other modifications performed with an intention of producing a correct, consistent, accurate, and complete...
of XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
. This can be done using a plain text
Plain text
In computing, plain text is the contents of an ordinary sequential file readable as textual material without much processing, usually opposed to formatted text....
editor
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....
, with all the code visible, but XML editors have added facilities like tag completion
Word completion
Word completion is a common feature in web browsers and similar text entry contexts. When a user begins the entry of a frequently-used word, the computer automatically completes it, or proposes a list of choices....
and menus and buttons for tasks that are common in XML editing, based on data supplied with document type definition
Document Type Definition
Document Type Definition is a set of markup declarations that define a document type for SGML-family markup languages...
(DTD) or the XML tree.
There are also graphical XML editors that hide the code in the background and present the content to the user in a more user-friendly format, approximating the rendered
Rendering (computer graphics)
Rendering is the process of generating an image from a model , by means of computer programs. A scene file contains objects in a strictly defined language or data structure; it would contain geometry, viewpoint, texture, lighting, and shading information as a description of the virtual scene...
version or editing forms. This is helpful for situations where people who are not fluent in XML code need to enter information in XML based documents such as time sheets and expenditure reports. And even if the user is familiar with XML, use of such editors, which take care of syntax details, is often faster and more convenient.
Functionality beyond syntax highlighting
An XML editor goes beyond the syntax highlighting offered by many plaintext editors and generic source code editors, verifying the XML source based on an XML SchemaXML Schema
XML Schema, published as a W3C recommendation in May 2001, is one of several XML schema languages. It was the first separate schema language for XML to achieve Recommendation status by the W3C...
or XML DTD, and some can do it as the document is being edited in real time.
Other features of an editor designed specifically for editing XML might include element word completion and automatic appending of a closing tag whenever an opening tag is entered.
These features can help to prevent typographically originating errors in the XML code.
Some XML editors provide for the ability to run an XSLT
XSLT
XSLT is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized by the processor in standard XML syntax or in another format,...
transform, or series of transforms, over a document. Some of the larger XML packages even offer XSLT debugging features and XSL-FO processors for generation of PDF files from documents.
Textual editors
Text XML editors generally provide features dealing with working with element tags. Syntax highlightingSyntax highlighting
Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and...
is a basic standard of any XML editor; that is, they color element text differently from regular text. Element and attribute completion based on a DTD or schema is also available from many text XML editors. Displaying line number
Line number
In computing, a line number is a method used to specify a particular sequence of characters in a text file. The most common method of assigning numbers to lines is to assign every line a unique number, starting at 1 for the first line, and incrementing by 1 for each successive line.In the C...
s is also a common and useful feature, as is providing the ability to reformat a document to conform to a particular style of indenture
Indentation
An indentation may refer to:* A notch, or deep recesses; for instance in a coastline, or a carving in rock* The placement of text farther to the right to separate it from surrounding text....
.
Here is an example of edition in a text editor with syntax coloring:
The advantage of text editors is that they present exactly the information that is stored in the XML file. It is the best way to control the formatting of the file (such as indentations), to do low-level operations (such as a find/replace on element names) and to edit XML files without any schema or configuration file.
Graphical editors
Graphical editors based on GUIs may be easier for some people to use than text editors, and may not require knowledge of XML syntax. These are often called WYSIWYGWYSIWYG
WYSIWYG is an acronym for What You See Is What You Get. The term is used in computing to describe a system in which content displayed onscreen during editing appears in a form closely corresponding to its appearance when printed or displayed as a finished product...
("What You See Is What You Get") editors, but not all of them are WYSIWYG: graphical XML editors can be WYSIWYG when they try to display the final rendering or WYSIWYM
WYSIWYM
WYSIWYM is an acronym for What You See Is What You Mean, and refers to a paradigm for document editing...
("What You See Is What You Mean") when they try to display the actual meaning of XML elements. When they are not WYSIWYG, they do not display the (or one of the) graphical end result of a document, but instead focus on conveying the meaning of the text. They use DTDs or XML schemas and/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 tend to be fairly free-form in structure, which tends to defy the generally rigid nature of many graphical editors.
In the above example, the editor is using a configuration file to know that the TABLE element represents a table, the TR element represents a row of the table, and the TD element represents a cell of the table. It is using this information to display the table based on this structuring information, in order to make editing easier.
Schema and configuration files 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 let people edit files directly with the tags represented by some form of graphical viewing rather than bare XML code. Often, WYSIWYG editors attempt to emulate the end result of some transform or CSSCSS
-Computing:*Cascading Style Sheets, a language used to describe the style of document presentations in web development*Central Structure Store in the PHIGS 3D API*Closed source software, software that is not distributed with source code...
stylesheet application. This emulation may or may not be possible, depending on the transformation from XML into the end result.
Naive use of a WYSIWYG editor can lead to the creation of documents that do not have the intrinsic 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
Web page
A web page or webpage is a document or information resource that is suitable for the World Wide Web and can be accessed through a web browser and displayed on a monitor or mobile device. This information is usually in HTML or XHTML format, and may provide navigation to other web pages via hypertext...
could use an H2 element (meaning: second level title) instead of H1 (meaning: first level title) 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
Web browser
A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...
.
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. The WYSIWYG editors that do support XSLT, such as Syntext Serna
Syntext Serna
Syntext Serna is a WYSIWYG XML editor from Syntext, Inc. Syntext Serna works on Windows, Linux, Mac OS X, and Sun Solaris/SPARC.- XML editing features :...
, will therefore apply changes directly to the original XML, while updating the view by running the XSLT for every change.
In the above example, a stylesheet is used to color table cells in a particular way. For instance, even rows do not have the same background color as odd rows, in order to make reading easier.
See also
- List of XML editors
- Authoring system
- EditingEditingEditing is the process of selecting and preparing written, visual, audible, and film media used to convey information through the processes of correction, condensation, organization, and other modifications performed with an intention of producing a correct, consistent, accurate, and complete...
- Source code editorSource code editorA source code editor is a text editor program designed specifically for editing source code of computer programs by programmers. It may be a standalone application or it may be built into an integrated development environment ....
Edited formats
- XMLXMLExtensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
- Darwin Information Typing ArchitectureDarwin Information Typing ArchitectureThe Darwin Information Typing Architecture is an OASIS standard XML data model for authoring and publishing. Many third party tools support authoring, including Adobe FrameMaker, XMetaL, Arbortext, Quark XML Author, Oxygen XML Editor, easyDITA, and SDL Xopus...
(DITA) - DocBookDocBookDocBook is a semantic markup language for technical documentation. It was originally intended for writing technical documents related to computer hardware and software but it can be used for any other sort of documentation....