XML Tutorials - Herong's Tutorial Examples - v5.25, by Herong Yang
Using Google Chrome as an XML Syntax Checker
This section provides a tutorial example on how to use Google Chrome as an XML file syntax checker. If there are syntax errors in an XML file, Chrome will stop displaying the XML file at the first error location.
Google Chrome can also be used as an XML syntax checker.
Look at the following XML file, incorrect.xml
<?xml version="1.0"?> <!-- incorrect.xml - Copyright (c) 1999-2014 HerongYang.com. All Rights Reserved. --> <dictionary> <word> <update date="2014-12-23"/> <name is_acronym="true">XML</Name> <description>eXtensible Markup Language</description> </word> <word> <update date="2014-12-23"/> <name is_acronym="true">POP</name> <definition default>Post Office Protocol</definition> <definition>Point Of Purchase</definition> </dictionary>
Do you know how many syntax errors are in this XML file?
If you open incorrect.xml with Chrome, you will see the following:
This page contains the following errors: error on line 8 at column 30: Opening and ending tag mismatch: name line 0 and Name Below is a rendering of the page up to the first error.
This is almost perfect.
Exercise: Fix all the syntax errors in incorrect.xml.
The following picture shows you how Google Chrome detects and displays XML syntax errors:
Table of Contents
Introduction of XML (eXtensible Markup Language)
Using Google Chrome as an XML Browser
►Using Google Chrome as an XML Syntax Checker
Using Mozilla Firefox as an XML Browser
Using Mozilla Firefox as an XML Syntax Checker
Using Apple Safari as an XML Browser
Using Apple Safari as an XML Syntax Checker
Using Microsoft Edge as an XML Browser
Using Microsoft Edge as an XML Syntax Checker
Using Internet Explorer as an XML Browser
Using Internet Explorer as an XML Syntax Checker
XML Spy and Other XML Browsers
DOM (Document Object Model) Programming Interface
SAX (Simple API for XML) Programming Interface
DTD (Document Type Definition) Introduction
Validating an XML Document against the Specified DTD Document Type
XSD (XML Schema Definition) Introduction
Validating XML Documents Against Specified XML Schemas
XSL (Extensible Stylesheet Language) Introduction
XSLT (XSL Transformations) Introduction
XSLT Elements as Programming Statements
Control and Generate XML Element in the Result
PHP Extensions for XML Manipulation
Processing XML with Python Scripts
XML Tools Plugin for Notepad++
XML Plugin Packages for Atom Editor