XML editor

Last updated

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.

Contents

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.

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 schema or XML DTD, and some can do it as the document is being edited in real time. [1] 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.

 <?xml version="1.0" encoding="utf-8"?>  <TrackedItemsList>    <FlowRecipeID Value="TestPP.BND"/>    <MaterialID   Value="54321"/>  </TrackedItemsList>

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 WYSIWYG ("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.

Xml graphical editor.png

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 CSS 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.

Xml editor table.png

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.

Application domains

See also

Edited formats

Related Research Articles

<span class="mw-page-title-main">HTML</span> HyperText Markup Language

The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It defines the meaning and structure of web content. It is often assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.

<span class="mw-page-title-main">Markup language</span> Modern system for annotating a document

A markuplanguage is a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. Markup is often used to control the display of the document or to enrich its content to facilitate automated processing.

<span class="mw-page-title-main">Standard Generalized Markup Language</span> Markup language

The Standard Generalized Markup Language is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on two postulates":

<span class="mw-page-title-main">XML</span> Markup language by the W3C for encoding of data

Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.

DocBook 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.

An HTML element is a type of HTML document component, one of several types of HTML nodes. The first used version of HTML was written by Tim Berners-Lee in 1993 and there have since been many versions of HTML. The most commonly used version is HTML 4.01, which became official standard in December 1999. An HTML document is composed of a tree of simple HTML nodes, such as text nodes, and HTML elements, which add semantics and formatting to parts of document. Each element can have HTML attributes specified. Elements can also have content, including other elements and text.

Schematron is a rule-based validation language for making assertions about the presence or absence of patterns in XML trees. It is a structural schema language expressed in XML using a small number of elements and XPath languages. In many implementations, the Schematron XML is processed into XSLT code for deployment anywhere that XSLT can be used.

XSL-FO is a markup language for XML document formatting that is most often used to generate PDF files. XSL-FO is part of XSL, a set of W3C technologies designed for the transformation and formatting of XML data. The other parts of XSL are XSLT and XPath. Version 1.1 of XSL-FO was published in 2006.

In web development, "tag soup" is a pejorative for syntactically or structurally incorrect HTML written for a web page. Because web browsers have historically treated structural or syntax errors in HTML leniently, there has been little pressure for web developers to follow published standards, and therefore there is a need for all browser implementations to provide mechanisms to cope with the appearance of "tag soup", accepting and correcting for invalid syntax and structure where possible.

An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constraints are generally expressed using some combination of grammatical rules governing the order of elements, Boolean predicates that the content must satisfy, data types governing the content of elements and attributes, and more specialized rules such as uniqueness and referential integrity constraints.

<span class="mw-page-title-main">XMLSpy</span> XML and JSON editing integrated development environment

XMLSpy is a proprietary XML editor and integrated development environment (IDE) developed by Altova. XMLSpy allows developers to create XML-based and Web services applications using technologies such as XML, JSON, XBRL, XML Schema, XSLT, XPath, XQuery, WSDL and SOAP.

<span class="mw-page-title-main">Oxygen XML Editor</span>

The Oxygen XML Editor is a multi-platform XML editor, XSLT/XQuery debugger and profiler with Unicode support. It is a Java application so it can run in Windows, Mac OS X, and Linux. It also has a version that can run as an Eclipse plugin.

A structure editor, also structured editor or projectional editor, is any document editor that is cognizant of the document's underlying structure. Structure editors can be used to edit hierarchical or marked up text, computer programs, diagrams, chemical formulas, and any other type of content with clear and well-defined structure. In contrast, a text editor is any document editor used for editing plain text files.

A Formal Public Identifier (FPI) is a short piece of text with a particular structure that may be used to uniquely identify a product, specification or document. FPIs were introduced as part of Standard Generalized Markup Language (SGML), and serve particular purposes in formats historically derived from SGML. Some of their most common uses are as part of document type declarations (DOCTYPEs) and document type definitions (DTDs) in SGML, XML and historically HTML, but they are also used in the vCard and iCalendar file formats to identify the software product which generated the file.

Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated.

The W3C's XML Schema Recommendation defines a formal mechanism for describing XML documents. The standard has become popular and is used by the majority of standards bodies when describing their data.

XQuery is a query and functional programming language that queries and transforms collections of structured and unstructured data, usually in the form of XML, text and with vendor-specific extensions for other data formats. The language is developed by the XML Query working group of the W3C. The work is closely coordinated with the development of XSLT by the XSL Working Group; the two groups share responsibility for XPath, which is a subset of XQuery.

Stylus Studio is an integrated development environment (IDE) for the Extensible Markup Language (XML). It consists of a variety of tools and visual designers to edit and transform XML documents and legacy data such as electronic data interchange (EDI), comma-separated values (CSV) and relational data.

A document type declaration, or DOCTYPE, is an instruction that associates a particular XML or SGML document with a document type definition (DTD). In the serialized form of the document, it manifests as a short string of markup that conforms to a particular syntax.

<span class="mw-page-title-main">Journal Article Tag Suite</span>

The Journal Article Tag Suite (JATS) is an XML format used to describe scientific literature published online. It is a technical standard developed by the National Information Standards Organization (NISO) and approved by the American National Standards Institute with the code Z39.96-2012.

References

  1. Goldberg, Kevin Howard (2008-01-01). "8". XML: Visual QuickStart Guide (2nd ed.). Peachpit. p. 110. ISBN   978-0321559678.