SharePoint Document Issues

How to Find and Use the XML Viewer Web Part in SharePoint Online

Rana GarciaRana Garcia Nov 3, 2026 869 views

Question details

The user needs to display XML files as HTML using XSLT but cannot find the XML Viewer web part in SharePoint Online. Additionally, linking an internal XML file causes a URL retrieval error.

How to Find and Use the XML Viewer Web Part in SharePoint Online
Product
SharePoint Online
Device & OS
not provided
Scenario
Attempting to embed and format XML data using the XML Viewer web part and linking to an XML file stored within a SharePoint document library.
Observed behavior
The XML Viewer web part is completely missing from the modern page interface. When successfully added elsewhere, entering the XML file path yields a 'Cannot retrieve the URL specified in the XML link property' error.
Before you start

Ensure you have Site Administrator permissions in SharePoint Online, as you may need to run PowerShell commands to allow custom scripts or adjust document library permissions.

Solution 1Recommended

Add the XML Viewer via Classic Web Part Pages

The XML Viewer web part is not supported on modern SharePoint pages. You must create a classic page to access and use this feature.

Microsoft has deprecated several classic web parts in the modern SharePoint experience, including the XML Viewer. To use it, you need to revert to a classic Web Part Page.

1
Navigate to Site Contents

Click the gear icon in the top right corner of your SharePoint site and select 'Site Contents'.

2
Create a Classic Page

Open the 'Site Pages' library, click 'New', and look for 'Web Part Page'. If not available, create a basic page and switch to the classic experience via the bottom-left prompt.

3
Insert the Web Part

Click 'Add a Web Part' inside any layout zone on your classic page.

4
Select XML Viewer

In the categories menu, select 'Content Rollup'. Choose 'XML Viewer' from the available parts and click 'Add'.

Add the XML Viewer via Classic Web Part Pages
Web Part Activated: Once added, you can open the web part tool pane to input your XML Link and XSL Editor properties.
Free Microsoft Office alternative

Manage Your Documents Effectively with WPS Office

While SharePoint handles complex web parts and server-side features, WPS Office provides a lightweight, free alternative for creating, editing, and managing your everyday office documents with complete format compatibility.

  1. 1. Download and Install: Visit the official WPS website to download and install WPS Office Free on your device.
  2. 2. Open Your Documents: Launch WPS Office and choose the Writer, Spreadsheet, or Presentation module.
  3. 3. Manage Files Seamlessly: Click 'Open' to browse your local files or connect your preferred cloud storage to easily manage and edit your documents.
Free and lightweight office suite for daily productivityFully compatible with Microsoft Office formats (Docx, Xlsx, Pptx)Familiar and intuitive user interface with zero learning curveSeamless local and cloud document management
microsoft office alternative - wps office

Frequently Asked Questions

Why is the XML Viewer web part missing in modern SharePoint pages?

Microsoft has phased out several classic web parts, including the XML Viewer, in the modern SharePoint experience to prioritize newer security and design frameworks. It can now only be accessed by creating a classic Web Part Page.

How do I link an XML file correctly in the XML Viewer web part?

You must use the fully qualified, absolute SharePoint URL (e.g., https://tenant.sharepoint.com/sites/site/library/file.xml) instead of a relative path or a local file path. Ensure the URL points directly to the file extension.

What does the 'Cannot retrieve the URL specified' error mean in SharePoint?

This error typically occurs when the provided URL in the XML link property is invalid, formatted as a relative path, or if the current users attempting to load the page lack the required read permissions for the document library where the XML file is hosted.