Online visitors

People learning around the world

Online

—

Visitors exploring W3Schools

Online visitors by country Circles show approximate country locations. The country list provides the visitor counts.

Circles represent countries, not exact visitor locations.

Country

Online

Loading country activity…

    XML Declaration

    XML Tutorials


    The XML declaration is optional, and it refers to the version and encoding of the XML document. This lesson describes the XML declaration with examples.

    XML Declaration

    Syntax:

    <?xml version="1.0" encoding="ISO-8859-15"?>
    XML Example:
    <?xml version="1.0" encoding="ISO-8859-15"?>
    <address>
      <name>Alex</name>
      <company>w3schools</company>
      <phone>(091) 123-4567</phone>
    </address>
    • Declaration of XML is also called the XML prolog.
    • prolog of XML is case sensitive and must be written in lower-case.
    • XML prolog is optional, but if required, it must be in the document's first line.
    • To avoid errors, encoding should be used, or the XML file must be saved as UTF-8.
    • The default character encoding for XML documents is UTF-8.


    Found This Page Useful? Share It!
    Get the Latest Tutorials and Updates
    Join us on Telegram

    Notifications

    Updates are enabled for this browser.

    Receive new tutorials, articles and learning resources. You can turn updates off anytime.