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) 2014,, All Rights Reserved.
  <update date="2014-12-23"/>
  <name is_acronym="true">XML</Name>
  <description>eXtensible Markup Language</description>
  <update date="2014-12-23"/>
  <name is_acronym="true">POP</name>
  <definition default>Post Office Protocol</definition>
  <definition>Point Of Purchase</definition>

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:
XML Syntax Error Showing in Chrome

Last update: 2014.

Table of Contents

 About This Book

 Introduction of XML (eXtensible Markup Language)

 XML File Syntax

XML File Browsers

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

 Syntaxes of DTD Statements

 Validating an XML Document against the Specified DTD Document Type

 XSD (XML Schema Definition) Introduction

 Syntaxes of XSD Statements

 Validating XML Documents Against Specified XML Schemas

 XSL (Extensible Stylesheet Language) Introduction

 XSLT (XSL Transformations) Introduction

 Java Implementation of XSLT

 XPath (XML Path) Language

 XSLT Elements as Programming Statements

 Control and Generate XML Element in the Result

 XML Notepad - XML Editor

 XML Tools Plugin for Notepad++

 XML 1.1 Changes and Parsing Examples

 Outdated Tutorials


 PDF Printing Version