Xponent logo Xponent Specialists In Large XML Documents Contact

Xponent's Mostly XML Blog

XML Editors: Some Are Not

If you are looking for an XML Editor make sure it enforces proper XML grammar. As a simple test, copy and paste the following text into the editor:

Ampersand & is illegal in XML and should result in an error.
So is &#19;
and &gt; should be expanded to appear as ">".

I recently Googled for "XML editor" and downloaded the first nine that are either free or offered an unregistered free trial. One of them failed on a simple test of XML grammar rules. It allowed me to enter the ampersand character, which is illegal in XML documents unless it is in the escaped format, &amp;. It allowed any numeric entity reference to Unicode characters that are outside the character range allowed by XML. It opened any text file and displayed non-printable characters that occur in the header section of the file. Two other editors reported the violations, but neither expanded declared entities as required by the XML specification.

Why is this important? If no one other than yourself will use the XML then it is an academic issue that may not be important to you. XML is W3C standard, and computer systems world-wide process XML documents according to this standard. Such processes fail if the XML is not compliant and that can be costly for all parties involved.

A case in point is made in a published article( http://thedailywtf.com/Articles/The-XML-Escape.aspx) where a vendor regularly sent a company XML feeds containing numerous unescaped ampersand characters, resulting in unnecessary, additional work for the company.

XML is a standard with a specific syntax defined by the World Wide Web Consortium (W3C http://www.w3.org/), the main international standards organization for the World Wide Web. The XML Standard facilitates the development of software that reads XML files in a reliable manner. An editor that does not adhere to the XML standard is essentially a text editor rather than an XML editor.

Privacy Statement

Copyright Ⓒ 2008-2018. Xponent LLC. All rights reserved.