Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this FAQ

The XML FAQ — Frequently-Asked Questions about the Extensible Markup Language

Section 2: Existing users

Q 2.7: How do I execute or run an XML file?

Not a meaningful question. XML is a data format, not a programming language.

You can't and you don't. XML itself is not a programming language, so normal XML documents don't ‘run’ or ‘execute’. XML is a markup specification language and XML files are just data: they sit there until you run a program which displays them (like a browser) or does some work with them (like a converter which writes the data in another format, or a database which reads the data), or modifies them (like an editor).

If you want to view or display an XML file, open it with an XML editor or an XML browser.

XSLT3 and XSL:FO

The water is muddied by the fact that the most popular transformation processing languages (XSLT3 and XSL:FO) are actually written in XML syntax, because they are declarative, not procedural. In these special cases you can be said to ‘execute’ an XML file, by running a processing application like Saxon, which compiles the directives specified in the files into Java bytecode to process XML documents. In this sense, you could compare them with other programming languages, but you would be comparing the language facilities, not the XML syntax in which they are written.