Menu
×
   ❮     
HTMLCSSJAVASCRIPTSQLPYTHONJAVAPHPHOW TOW3.CSSCC++C#BOOTSTRAPREACTMYSQLJQUERYEXCELXMLDJANGONUMPYPANDASNODEJSDSATYPESCRIPTANGULARGITPOSTGRESQLMONGODBASPAIRGOKOTLINSASSVUEGEN AISCIPYCYBERSECURITYDATA SCIENCEINTRO TO PROGRAMMINGBASH

XML Tutorial

XML HOMEXML IntroductionXML How to useXML TreeXML SyntaxXML ElementsXML AttributesXML NamespacesXML DisplayXML HttpRequestXML ParserXML DOMXML XPathXML XSLTXML XQueryXML XLinkXML ValidatorXML DTDXML SchemaXML Server

XML AJAX

AJAX IntroductionAJAX XMLHttpAJAX RequestAJAX ResponseAJAX XML FileAJAX PHPAJAX ASPAJAX DatabaseAJAX ApplicationsAJAX Examples

XML DOM

DOM IntroductionDOM NodesDOM AccessingDOM Node InfoDOM Node ListDOM TraversingDOM NavigatingDOM Get ValuesDOM Change NodesDOM Remove NodesDOM Replace NodesDOM Create NodesDOM Add NodesDOM Clone NodesDOM Examples

XPath Tutorial

XPath IntroductionXPath NodesXPath SyntaxXPath AxesXPath OperatorsXPath Examples

XSLT Tutorial

XSLT IntroductionXSL LanguagesXSLT TransformXSLT <template>XSLT <value-of>XSLT <for-each>XSLT <sort>XSLT <if>XSLT <choose>XSLT ApplyXSLT on the ClientXSLT on the ServerXSLT Edit XMLXSLT Examples

XQuery Tutorial

XQuery IntroductionXQuery ExampleXQuery FLWORXQuery HTMLXQuery TermsXQuery SyntaxXQuery AddXQuery SelectXQuery Functions

XML DTD

DTD IntroductionDTD Building BlocksDTD ElementsDTD AttributesDTD Elements vs AttrDTD EntitiesDTD Examples

XSD Schema

XSD IntroductionXSD How ToXSD <schema>XSD ElementsXSD AttributesXSD RestrictionsXSD Complex ElementsXSD EmptyXSD Elements-onlyXSD Text-onlyXSD MixedXSD IndicatorsXSD <any>XSD <anyAttribute>XSD SubstitutionXSD Example

XSD Data Types

XSD StringXSD Date/TimeXSD NumericXSD MiscXSD Reference

Web Services

XML ServicesXML WSDLXML SOAPXML RDFXML RSS

XML Examples

XML ExamplesXML QuizXML SyllabusXML Study PlanXML Certificate

References

DOM Node TypesDOM NodeDOM NodeListDOM NamedNodeMapDOM DocumentDOM ElementDOM AttributeDOM TextDOM CDATADOM CommentDOM XMLHttpRequestDOM ParserXSLT ElementsXSLT/XPath Functions

XML Tutorial

Learn XML

XML stands for eXtensible Markup Language.

XML was designed to store and transport data.

XML was designed to be both human- and machine-readable.

Start learning XML now »

XML Example 1

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

Display the XML File »Display the XML File as a Note »

×

XML Example 2

<?xml version="1.0" encoding="UTF-8"?>
<breakfast_menu>
<food>
    <name>Belgian Waffles</name>
    <price>$5.95</price>
    <description>
   Two of our famous Belgian Waffles with plenty of real maple syrup
   </description>
    <calories>650</calories>
</food>
<food>
    <name>Strawberry Belgian Waffles</name>
    <price>$7.95</price>
    <description>
    Light Belgian waffles covered with strawberries and whipped cream
    </description>
    <calories>900</calories>
</food>
<food>
    <name>Berry-Berry Belgian Waffles</name>
    <price>$8.95</price>
    <description>
    Belgian waffles covered with assorted fresh berries and whipped cream
    </description>
    <calories>900</calories>
</food>
<food>
    <name>French Toast</name>
    <price>$4.50</price>
    <description>
    Thick slices made from our homemade sourdough bread
    </description>
    <calories>600</calories>
</food>
<food>
    <name>Homestyle Breakfast</name>
    <price>$6.95</price>
    <description>
    Two eggs, bacon or sausage, toast, and our ever-popular hash browns
    </description>
    <calories>950</calories>
</food>
</breakfast_menu>

Display the XML File »Display with XSLT »

×

Header



Why Study XML?

XML plays an important role in many different IT systems.

XML is often used for distributing data over the Internet.

It is important (for all types of software developers!) to have a good understanding of XML.


What You Will Learn

This tutorial will give you a solid understanding of:

  • What is XML?
  • How does XML work?
  • How can I use XML?
  • What can I use XML for?

Important XML Standards

This tutorial will also dig deep into the following important XML standards:

We recommend reading this tutorial, in the sequence listed in the left menu.


Learn by Examples

Examples are better than 1000 words. Examples are often easier to understand than text explanations.

This tutorial supplements all explanations with clarifying "Try it Yourself" examples.


XML Quiz Test

Test your XML skills at W3Schools!

Start the XML Quiz!

Track Your Progress

Create a free W3Schools account and get access to more features and learning materials:

  • CheckmarkView your completed tutorials, exercises, and quizzes
  • CheckmarkKeep an eye on your progress and daily streaks
  • CheckmarkSet goals and create learning paths
  • CheckmarkCreate your own personal website

Sign Up for Free

Note: This is an optional feature. You can study at W3Schools without creating an account.



Kickstart your career

Get certified by completing the course

Get certifiedw3schoolsCERTIFIED.2025

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.

close