XML DOM - Validate XML

## XML DOM Tutorial

DOM HOME DOM Introduction DOM Nodes DOM Node Tree DOM Parser DOM Load Function DOM Methods DOM Accessing DOM Node Info DOM Node List DOM Traversing DOM Browsers DOM Navigating

## Manipulate Nodes

DOM Get Values DOM Change Nodes DOM Remove Nodes DOM Replace Nodes DOM Create Nodes DOM Add Nodes DOM Clone Nodes DOM XMLHttpRequest

## XML DOM Reference

DOM Node Types DOM Node DOM NodeList DOM NamedNodeMap DOM Document DOM DocumentImpl DOM DocumentType DOM ProcessingInstr DOM Element DOM Attribute DOM Text DOM CDATA DOM Comment DOM XMLHttpRequest DOM ParseError Obj DOM Parser Errors
DOM Summary

## XML DOM Examples

DOM Examples DOM Validator

# XML DOM Verify XML Syntax

« Previous
Next Chapter »

## XML Errors will Stop you

Errors in XML documents will stop your XML program.

The W3C XML specification states that a program should not continue to process an XML document if it finds an error. The reason is that XML software should be easy to write, and that all XML documents should be compatible.

With HTML it was possible to create documents with "errors" (like dropping end tags). One of the main reasons that HTML browsers are so big and incompatible, is that they have their own ways to figure out what a document should look like when they encounter an HTML error.

With XML this should not be possible.

## Verify Your XML Syntax

To help syntax-check your XML, paste the XML code in the text area below, and press the "Verify XML" button.

<?xml version="1.0" ?> <note> <to>Tove</to> <from>Jani</Ffrom> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>

## Verify Your XML File

To syntax-check an XML file, type the URL of the file into the input field below, and press the "Verify XML" button.

Filename:

To verify an error-free XML file, paste the following URL into the input field above: http://www.w3schools.com/dom/cd_catalog.xml

Note: If you get the error "Access denied" when accessing this file, it is because your browser security settings do not allow access across domains.

« Previous
Next Chapter »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE