Microsoft Office 2007 and later versions use XML as the basis for document structure. "X" in Word document format .DOCX comes from here. In addition, it is also used in Excel (XLSX file) and PowerPoint (PPTX file).
There are several ways you can open XML files directly like opening and editing them with a text editor, viewing files with any web browser or using a web page that lets you view, edit and even convert they are in other formats.
Because XML files are really just text files, you can open them in any text editor. The problem is, many text editors - like Notepad - are not designed to display XML files with its proper structure. You can use Notepad to open XML files and see them quickly, but there are better tools to work with these files. To open the XML file in Notepad, right-click the XML file you want to open, point to ' Open with ' on the context menu, and click the ' Notepad ' option.
Note : The example here we use on Windows but on other operating systems is still possible. Look for a third-party text editor designed to support XML files on other operating systems.
The XML file has been opened but you can see, it takes most of the original format and leaves the entire content in two rows of documents.
Although, Notepad is useful for quickly checking XML files, it breaks the original file format. Use a more advanced tool like Notepad ++, which will highlight the syntax and format the file the way it was formatted.
Below is the same XML file opened in Notepad ++:
See also: How to read XML files with iTaxViewer software
If you don't edit the XML file, just view it, then the browser you're using is very suitable for this job. And in fact, your default browser can be set as the default XML file viewer. Therefore, double click on the XML file to open it in the browser.
If not, you can right-click the file to find the option to open the file with any application you want. Just select your web browser from the list of programs. The example here select Chrome.
When the file opens, you will see the data is neatly structured. It doesn't look as good as it looks in the code that is color coded when opened with Notepad ++ but better when opened with Notepad.
If you occasionally want to edit an XML file and don't want to download a new text editor or if you need to convert an XML file to another format, there are a number of rich online XML editors available for free. Websites like TutorialsPoint.com, XMLGrid.net and CodeBeautify.org allow you to view and edit XML files. After you have made the edit, you can download the modified XML file or even convert the file to another format.
For example, here we will use CodeBeautify.org. The page is divided into three parts. On the left is the XML file you are working on; In the middle, you will find some options; on the right is the result when making changes. For example, in the picture below, the full XML file is on the left and the tree view is displayed in the results table after selecting the " Tree View " button.
The image below is the options in the middle, to help you see better. Use the " Browse " button to upload XML files from your computer or " Load URL " button to pull XML from online sources.
The ' Tree View ' button displays your data in a nicely formatted tree structure in the results pane, with all your tags on the left orange and attributes on the right of the tags.
" Beautify " displays your data with neat, easy-to-read lines in the results pane.
The ' Minify ' button displays your data using as little white space as possible. It tries to put all pieces of data on one line. This type of display is very handy when making smaller files. It will save some space but still read efficiently.
And finally, you can use the ' XML to JSON ' button to convert the XML format to JSON, the ' Export to CSV ' button to save the data as a comma-separated value file or the ' Download ' button. to download any changes you make in the new XML file.
See more: