How to Open an XML File as Plain Text in Word
Question details
The user needs to view the raw HTML/XML tags of an XML file within Microsoft Word without the application automatically rendering or interpreting the code.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Opening and viewing the raw code of an XML file for editing or troubleshooting.
- Observed behavior
- Word automatically interprets the XML file structure, hiding the raw XML tags instead of displaying them as plain text.
Ensure you know the exact file path of the XML document you want to open, as you will need to browse for it directly from within the Word application.
Enable Format Conversion Confirmation in Word Settings
By enabling the format conversion prompt in Word's Advanced settings, you can intercept the automatic rendering process and manually choose to open the file as plain text.
This method applies universally to your Word installation, meaning you will be prompted to confirm the conversion format whenever you open non-native document formats in the future.
Open Microsoft Word. Click on 'File' in the top-left corner, then scroll down and select 'Options' at the bottom of the menu.
In the Word Options dialog box, click on the 'Advanced' tab on the left. Scroll down to the 'General' section and check the box labeled 'Confirm file format conversion on open'. Click 'OK' to save your changes.
Go to 'File', select 'Open', and use the 'Browse' button to locate your XML file. Select the file and click 'Open'.
A 'Convert File' dialog box will appear. Select 'Plain Text' from the list and confirm. The file will now open, displaying all raw XML tags as unmodified text.

Edit Text and Code Files Seamlessly with WPS Office
If you frequently work with raw text, code snippets, or diverse document formats, WPS Office provides a highly compatible and lightweight environment. It serves as a powerful alternative to Microsoft Office, easily handling standard documents and plain text without unnecessary complexity.

Frequently Asked Questions
Why does Microsoft Word hide the tags in an XML file by default?
By default, Microsoft Word is designed to act as a rich text editor. When it detects an XML file, it attempts to parse the structure and render the data or document formatting visually, assuming you want to read the structured content rather than the raw code.
Can I save the file back as an XML document after editing the plain text?
Yes. Once you finish editing the plain text XML, go to 'File' > 'Save As'. In the 'Save as type' dropdown menu, choose 'Plain Text (*.txt)', but manually type the '.xml' extension at the end of your file name (e.g., filename.xml) to ensure it saves correctly as an XML file.
Will enabling format conversion affect my normal Word documents?
No. Standard Word formats like .docx or .doc will continue to open normally without any prompts. The 'Confirm file format conversion on open' dialog will only appear when Word detects a non-native or distinct file format like XML, PDF, or legacy text formats.




