XML (Extensible Markup Language) files are not executable - they are designed to store data that is needed by different programs. You can create, open, and edit an XML file in any text editor. XML files are similar but different from HTML files. The XML file is used to store data, while the HTML file sets the parameters for displaying data on the screen. HTML files use certain tags like
or
, and in XML files, you can use whatever tags the programmer needs.
Steps
Method 1 of 4: Using a text editor

Step 1. Find the XML file you want to open
XML files are encoded in text format, so they can be easily opened and viewed in any text editor.

Step 2. Right click on the XML file and select "Open With"
A list of programs with which you can open this file will be displayed.

Step 3. Select Notepad (Windows) or TextEdit (Mac OS)
These pre-installed text editors (for the corresponding system) should be in the opened list of programs.
- If these programs are not listed, find them manually. Notepad is located in the% SystemRoot% \ system32 \ notepad.exe folder, and TextEdit is in the Applications folder.
- You can use more powerful text editors such as Notepad ++ or TextMate, which allow syntax highlighting and include advanced editing features. But you can view the entire XML file in the simplest text editor.

Step 4. Understanding the text displayed on the screen
The XML file you selected will be opened in a text editor. The complexity of the file depends on the purpose of its creation. Tags are used to find the information you need. As a rule, labels are self-explanatory, which makes it easier to view and find the information you need.
- Most likely, the first line of the XML file will be the following line:. This means that the content of the file is in XML format.
- Custom tags are used to place data in XML. Such tags are created for a specific program, so there is no single syntax for tags in XML. For example, one XML file can include a section and another file has a section, and both files function in the same way.
- Tags can be nested within other tags, resulting in a tag tree. For example, each tag can have multiple nested tags such as and.
Method 2 of 4: Using a Web Browser

Step 1. Find the XML file you want to open
While you can open such a file in any basic text editor (read the previous section), it will be easier for you to view the XML file in a browser because most browsers automatically arrange (indented) nested tags and allow sections to collapse.

Step 2. Right-click on the XML file and select "Open With"
A list of programs with which you can open this file will be displayed.

Step 3. Select a web browser from the list of programs
The XML file can be opened in any web browser. Most likely, you will find your browser in the list that opens; otherwise, start it manually.

Step 4. View the XML file in a browser
The XML file will open in a new browser tab. The entire content of the file is displayed, and the nested tags are automatically ordered (indented). This will make it easier for you to understand the purpose of a particular block of data.

Step 5. Expand or collapse the sections for easier viewing of the file
In the browser, you can change how the information stored in the XML file is displayed on the screen. Click the arrows or "+" / "-" buttons next to each section to expand or collapse it.
Method 3 of 4: Using Excel

Step 1. Start Excel
Typically, Excel is not listed in the list of programs that can open the XML file, so start by starting Excel.
Excel can display the data in the XML file in tabular form, making it easier to view the information

Step 2. Click "File" - "Open"
The "Open Document" window will open.

Step 3. Click Browse
This will allow you to find the XML file you want.

Step 4. Find the XML file on your computer
Most likely, such a file will automatically appear in the folder of your choice; otherwise, open the Save as type menu and select XML Files.

Step 5. Check the box next to "As XML Table"
This will convert the XML file to an Excel table.
Most likely, a window will open warning that the XML file is not a table. In this case, click OK to have Excel create the table based on the tags in the XML file

Step 6. Viewing the XML file
The XML file data will be displayed in a table according to the tag tree. Now you can apply the Sort and Filter tools to organize the data as you see fit.
Some complex XML files are inconvenient to view in tables. If your XML file contains many nested tags, use a special program to view the XML files
Method 4 of 4: Using an XML Viewer

Step 1. Download and install a program for viewing and editing XML files
Get one if you are working with a large number of XML files - it will greatly simplify the process of viewing and editing complex XML files. There are many programs, both free and paid. A popular program is the free XML Explorer program (xmlexplorer.codeplex.com).
The choice of the program depends on your goals. If you are going to create a lot of XML files, buy a professional XML editor that will automate and collaborate on large projects involving XML files

Step 2. Open the XML file in the installed program
Many programs automatically associate with XML files, which allows you to open such files by double-clicking on them. If that didn't work, right-click the XML file and choose Open With. In the list that opens, select the installed program.

Step 3. Viewing the XML file
Programs such as XML Explorer let you collapse sections and highlight syntax. In editor programs, you can make changes and additions to XML files.