How to Open XML


XML (Extensible Markup Language) files don't do anything on their own. They are simply a way of storing data that can be easily read by other programs. Many programs use XML to store data. As such, you can open, edit, and create an XML file in any text editor. XML is similar but distinct from HTML. XML is for carrying data, while HTML is for displaying it. HTML uses predefined tags, such as <p> or <h1>, while XML uses any tags that the creator needs.

Part 1
Using a Text Editor

Using a Text Editor on How to Open XML

1
XML files are encoded in plaintext, so you can open them in any text editor and be able to clearly read it.[1]

Using a Text Editor on How to Open XML

2
" This will display a list of programs to open the file in.

Using a Text Editor on How to Open XML

3
These are the pre-installed text editors for each operating system, and should already be on the list. If they aren't on the list, you'll need to browse for them. Notepad is located at %SystemRoot%\system32\notepad.exe, and TextEdit can be found in your Applications folder. You can use more advanced code editors like Notepad++ or TextMate as well, which can be useful for syntax highlighting and advanced editing. You can still see all of the information using a simple text editor.[2]

Using a Text Editor on How to Open XML

4
Your XML file will open in your text editor. The complexity of the file is dependent on what it was created for. Use the tag labels to find the information you are looking for. Generally the labels will be fairly self-explanatory, allowing you to browse through the data and find the information you need. You'll likely see <?xml version="1.0" encoding="UTF-8"?> at the top. This indicates that the following content is in XML format. XML uses custom tags to house pieces of data. Each of these tags are created for whatever program is using it, so there is no common syntax to the markup labels. For example, one XML file may have a <body></body> section, and other might have <message_body></message_body>, but both may function similarly. Tags can be nested inside other tags, creating a tree. For example, Each <note></note> tag may have several tags inside, such as <title></title> and <date></date>.

Part 2
Using a Web Browser

Using a Web Browser on How to Open XML

1
While you can use any basic text editor to open an XML file (see above), opening the file in a browser may make it a little easier to navigate. This is because most browsers automatically indent nested tags and allow you to collapse each section of the the XML tree.

Using a Web Browser on How to Open XML

2
" This will let you choose the program you want to use to open the file.

Using a Web Browser on How to Open XML

3
You can open the XML file in any web browser. Oftentimes, your web browser will already be on the list of suggested programs. If it isn't, you'll need to browse for it on your computer.

Using a Web Browser on How to Open XML

4
The XML file will open in a new tab in your browser. All of the contents will be displayed, and your browser will automatically indent nested tags. This can make it easier to tell which data belongs to which set.

Using a Web Browser on How to Open XML

5
The big advantage to using a browser to read XML files is the ability to control what you see. Click the arrows or +/- buttons next to each section to expand or minimize it.

Part 3
Using Excel

Using Excel on How to Open XML

1
Excel will not usually pop up as a suggested program, so the quickest way to open the file is to open Excel first. Excel can convert an XML file into a table, which can be useful for visually processing the information.

Using Excel on How to Open XML

2
" This will display the Open menu.

Using Excel on How to Open XML

3
This will let you look for files on your computer.

Using Excel on How to Open XML

4
You should be able to navigate to it and see it by default, but if you can't, click the "Type" menu and select "XML Files."

Using Excel on How to Open XML

5
" This will convert the XML file into an Excel table. You will generally be informed that the XML file does not refer to a schema. Click "OK" to have Excel construct one for you based on the tags in the file.

Using Excel on How to Open XML

6
Your XML file will be organized into a table based on the tag structure. You can use Excels sorting and filtering tools to customize the table from here.[3] You may have difficulties rendering complex XML files as tables. If your XML file has lots of nested tags, you may want to use an XML viewer instead.

Part 4
Using an XML Viewer

Using an XML Viewer on How to Open XML

1
If you deal with lots of XML files, you may want to get a viewer or XML editor. These can make handling complex XML files much easier. There are a variety of programs available, both free and paid. A popular free, open-source reader is XML Explorer (xmlexplorer.codeplex.com). Different programs will fit different needs. If you need to create a lot XML files, you may want a professional XML editor. These allow you to automate and collaborate on large XML projects.

Using an XML Viewer on How to Open XML

2
Many XML programs will set themselves as the default program for XML files, allowing you to simply double-click the XML file to open it. If you can't, right-click the XML file and select "Open With." Browse for your newly-installed program.

Using an XML Viewer on How to Open XML

3
Programs like XML Explorer allow you to collapse sections, as well as turn syntax highlighting on and off. More advanced programs may allow you to make edits and create additional entries.