跳到主要内容
XML/JSON Viewer

XML/JSON Viewer EN

GPE77 · Edge MV3

Right-click a text field (even read-only) to view its content as formatted XML/JSON. Interface available in Italian and English.

39用户 v1.2当前版本

简介

XML / JSON Viewer is a practical browser extension designed to make structured text from web pages easier to inspect and work with. It helps users capture XML or JSON content directly from page elements, form fields, selected text, text areas, inputs, dropdowns, or other interface components, then opens that content in a dedicated viewer for validation, formatting, searching, copying, downloading, and sharing by email. This makes it especially useful when dealing with raw payloads, service responses, request or response bodies, logs, configuration snippets, or structured data embedded inside complex web applications.

The extension integrates into the browser through a context menu action for opening a formatted XML/JSON view. When used, it does more than simply read the exact element that was clicked. It attempts to extract useful text from the target element, nearby ancestors, nested controls, and relevant form fields. If that does not produce usable content, it falls back to the currently active element and then to any highlighted text selection. This layered extraction process makes the extension more reliable across many types of page layouts, including interfaces where text is wrapped inside custom components or disabled fields.

After text is captured, the extension opens a separate viewer tab and analyzes the content. It checks whether the data appears to be XML, JSON, or an unrecognized format. It can also detect a header block before the body, which is helpful when content includes HTTP-style headers, status lines, or custom metadata ahead of the actual XML or JSON. When such a header is present, the extension displays it separately while formatting the body independently, improving clarity and making mixed content easier to review.

For XML content, the extension uses the browser parser to validate the structure. Valid XML is indented for readability and highlighted so tags, attributes, values, comments, and header information are easier to scan. If the XML is malformed, the viewer warns the user and shows the original body text instead of presenting it as valid. For JSON content, the extension parses and reformats the data with two-space indentation, then highlights keys, strings, numbers, booleans, and null values. If parsing fails, it reports the issue and displays the original text. If the content is neither XML nor JSON, the viewer still opens it as raw text and clearly indicates that the format was not recognized.

The viewer uses a dark-themed interface with a sticky toolbar for quick actions. Users can copy the current content to the clipboard, switch between raw and formatted views, save the content to a local file, or start an email-sharing workflow. The raw/formatted toggle is particularly useful when comparing the normalized output against the exact original source, which can help with troubleshooting malformed payloads or preserving whitespace-sensitive data.

Saving uses a timestamp-based filename and selects a file extension that matches the detected content type: XML for XML, JSON for JSON, and plain text for unknown formats. The extension also applies an appropriate MIME type. For sharing, it can use the browser and system sharing flow through the Web Share API when available. If sharing is not supported, it falls back to downloading the file and opening the default mail client with a prepared reminder to attach the downloaded file manually.

Key Features:
- Captures structured text from clicked elements, nearby form controls, active elements, or selected text.
- Opens content in a dedicated viewer tab separate from the original page.
- Detects XML, JSON, or unknown text and provides validation with clear status messages.
- Separates header information from the main body when HTTP-style headers or metadata are present.
- Formats and syntax-highlights valid XML and JSON for easier reading.
- Lets users switch between raw and formatted views for comparison and troubleshooting.
- Includes built-in search with highlighting, next/previous navigation, keyboard shortcuts, and live match counts.

How It Works:
1. Install the extension and right-click on a page element, field, or selected text containing XML, JSON, or related structured text.
2. Choose the context menu option to open the formatted XML/JSON view.
3. The extension extracts text from the clicked target, nearby elements, the active field, or the current text selection.
4. A dedicated viewer tab opens and loads the captured content from local extension storage.
5. The viewer checks for a header block, then analyzes the body as XML, JSON, or unrecognized text.
6. If valid, the content is formatted and highlighted; if invalid, the original text is shown with a warning or error message.
7. Use the toolbar to search, copy, toggle raw/formatted mode, save the file, access settings, or start the email sharing flow.

Privacy: - The extension stores interface preferences and captured text locally in browser storage to operate the viewer, and it uses browser download and clipboard capabilities for saving and copying content. No separate remote collection mechanism is present in the package contents.

XML/JSON Viewer 是做什么的

XML/JSON Viewer 是一款面向 Edge 的实用工具类扩展,主要用来解决浏览器里某类具体的小问题。官方对它的介绍是:Right-click a text field (even read-only) to view its content as formatted XML/JSON. Interface available in Italian and English.在微软 Edge 加载项商店上,它当前版本 1.2,约 39 名用户。

适合什么人用

从功能定位看,XML/JSON Viewer 更适合想补上浏览器原生缺失功能的用户。如果你平时只是偶尔遇到相关需求,用浏览器自带功能也能凑合;但如果这件事每天都发生,装一个专门处理它的扩展通常比手动操作省事得多。

怎么安装 XML/JSON Viewer

  1. 打开微软 Edge 加载项商店上的官方页面;
  2. 点「添加到浏览器」并确认权限提示;
  3. 装好后在扩展列表里固定图标,方便随时开关。

本站只做索引与介绍,安装包来自官方商店。如果商店页面提示当前地区不可用,说明该扩展未在你所在区域上架。

常见问题

XML/JSON Viewer 是免费的吗?

XML/JSON Viewer 在微软 Edge 加载项商店免费提供下载。它是浏览器扩展,装上就能直接用,不需要注册账号。

XML/JSON Viewer 安全吗?

它只申请了 0 项权限,范围比较克制,没有申请「读取所有网站数据」这种大权限。

XML/JSON Viewer 支持哪些浏览器?

当前收录的版本来自微软 Edge 加载项商店,适用于 Edge。同一个扩展在其他商店可能有对应版本,但功能与版本号不一定相同。

怎么卸载 XML/JSON Viewer?

在扩展管理页找到 XML/JSON Viewer,点移除即可。它在本地保存的设置会一起清掉,不会残留数据。

权限清单 来自 manifest.json 原文

接口权限 5

  • activeTab
  • contextMenus
  • downloads
  • scripting
  • storage