Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>XML ViewerNew to Visual Studio Code? Get it now.
XML Viewer

XML Viewer

Michael Antoly Green

|
1 install
| (0) | Free
View and edit XML files as interactive tables in Visual Studio Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

XML Viewer

View and edit XML files as interactive tables in Visual Studio Code.

XML Viewer presents repeated XML elements as rows and attributes and nested fields as columns. It also reads Excel 2003 SpreadsheetML XML tables with their existing column headers.

Open a file

Right-click an XML file in Explorer and choose XML Viewer: Open as Table, or use Reopen Editor With… → XML Viewer from an open editor. To make it your default, use Reopen Editor With… → Configure default editor for '*.xml'.

Use ⋯ → Таблица to choose an XML path or a SpreadsheetML worksheet. Nested collections are available as separate XML paths. Attributes appear as @name; nested fields appear as price/@currency. A dash marks an absent field. Editing it creates the field; an existing empty field remains distinct.

Edit tables

  • Double-click a cell, press F2 or Enter, or type to start editing.
  • Enter commits; Shift+Enter inserts a line break; Escape cancels.
  • Use Tab, Shift+Tab and arrow keys to move between cells.
  • Drag across cells, Shift-click or Shift+arrow to select a rectangular range; cell text is not selected. Click row/column headings to select whole rows/columns. Ctrl+A selects the table. Text remains selectable inside a cell editor.
  • Right-click a cell or live cell editor for the custom menu: copy, cut, paste, fill down, clear values, row operations, column sorting/width and source navigation. Keyboard clipboard operations support TSV including quoted multiline values. One pasted value fills the selected range; a larger range starts at its top-left corner. Paste must fit existing editable cells.
  • To copy complete rows, click a row number (Shift-click another number for several rows), then use Ctrl+C. Select a destination and press Ctrl+V: new rows are inserted after that row and its existing subtree, without overwriting it. The same commands are available in the context menu. XML structure, comments, namespace declarations and SpreadsheetML cell types are retained; one Undo reverses the entire insertion.
  • Numbered plans receive unused Section values; copied parent/child relationships are retained and conflicting sibling titles get a copy suffix. Section identifiers are stored as text where needed. Clipboard text remains TSV for external programs. To insert full rows from another spreadsheet, select the destination row number or use right-click → Строки → Вставить скопированные строки (also available under ⋯). Columns must match in count/name/order; formula, merged and indexed destination sheets require the source editor. Row packets support up to 1,000 rows / 4 MiB. Missing workbook styles are reported rather than silently dropped.
  • Filter across all columns. While text is entered, the search field exposes Aa (case), ab (whole word) and .* (regex). Invalid regex is explained; regex runs in a time-limited worker so it cannot freeze the editor.
  • Sort from the column context menu; sorting changes only the display. Resize by dragging the column edge or double-click it to fit the width. Large tables are paginated in groups of 150 rows.
  • Row operations are under ⋯ and right-click → Строки: add a sibling using the selected row's shape, duplicate its values, or delete with a list and confirmation. Clearing a range also requires confirmation. Undo restores a deletion or fill-down.
  • Tables containing Section and Title columns support collapsible numbered hierarchies and + Child. New rows receive unused section numbers; duplicated titles receive a suffix. Editing a parent section number does not automatically renumber its children; warnings identify missing parents and duplicate section numbers.
  • The left ↶ / ↷ arrows and right save icon use VS Code's document. Source navigation is under ⋯ or the context menu. Changes made in another editor update the table. Uncommitted cell text is cancelled with a notice if the source changes concurrently.

XML preservation

Cell changes patch the relevant source ranges rather than serializing the document. Unchanged comments, processing instructions, namespace declarations, attribute quotation, whitespace and line endings are preserved. XML special characters are escaped. Simple CDATA remains CDATA.

Edits are checked for well-formed XML before they are applied. Mixed content, text split by inline markup, formulas and merged spreadsheet cells are read-only; open the XML source to edit them. Numeric and Boolean SpreadsheetML cells retain their types and reject incompatible values. Row operations update SpreadsheetML row-count metadata. Row operations on sheets with explicit row indices or merged ranges require the source editor. Formulas are not evaluated or adjusted.

Scope and limits

  • VS Code 1.98 or newer, on desktop or in a remote extension host. The packaged extension is tested by installing it into a temporary VS Code 1.98.2 profile and running the real webview interaction suite. VS Code for the Web is not supported.
  • Plain XML and Excel 2003 SpreadsheetML (urn:schemas-microsoft-com:office:spreadsheet). Not .xlsx or arbitrary XML spreadsheet dialects.
  • SpreadsheetML uses a row containing Section and Title as its header when present in the first 30 rows; otherwise the first nonempty row is the header. Earlier rows remain intact in the source.
  • Documents up to 10 MiB, 100,000 XML elements, and 128 nesting levels. Each table supports up to 20,000 rows and 256 columns. Clipboard pastes support up to 10,000 cells.
  • No DTD, external entity resolution, XSD validation, formula calculation or simulation database integration.
  • No telemetry or network requests. XML values are displayed as text in a restricted webview.

The extension includes a generic catalog example and an original verification-plan example for testing. The latter demonstrates hierarchical columns using SpreadsheetML; compatibility with a particular external tool must be verified separately.

Local test-plan linting

XML Viewer checks XML syntax and reports diagnostics in VS Code Problems. For verification-plan tables it also underlines affected cells, explains issues on hover and shows error/warning counts in the footer. Click the counts to open Problems. Diagnostics update after edits and disappear when corrected; they do not block saving an unfinished plan.

The default xmlViewer.validation.profile is auto: semantic checks activate for tables with Section and Title plus either Link or Type. Set it to xml for XML syntax only, or testplan to require verification-plan columns. xmlViewer.validation.additionalTypes accepts extra importer-specific type names.

The initial profile checks section format, unique numbers, parents before children, nonempty titles, duplicate sibling titles, special characters in titles, supported coverage types, missing Link/Type pairs, one type per link or one shared type, common functional-link delimiter mistakes, integer Weight and Goal in the 1–100 range. Empty numeric fields produce warnings describing importer defaults. Description remains free-form text; XML escaping is handled by the editor.

Bare functional object names, full paths, wildcards and supported group/instance forms remain valid. Complex Tcl arguments, escaped identifiers and extended scope syntax are marked unverified, rather than incorrectly rejected. The rules follow the standard spreadsheet-style format described in Siemens Questa Verification Management 2024.2. Custom xml2ucdb.ini column mappings, coverage-object existence, HDL compilation, simulator import and measured coverage are not checked locally.

The expanded demo examples/coverage-plan.xml has 44 planned items spanning FIFO, AXI and pipeline functional coverage, assertions, directives, bins, structural code coverage, and named test records. examples/coverage-plan-errors.xml contains the same plan with 8 deliberate errors for testing the linter. Both are original fixtures with fictional coverage names, not simulator exports. Values in Goal are targets, not measured results.

Development

npm ci
npm run typecheck
npm test

Press F5 to launch an Extension Development Host. The automated host suite uses an isolated temporary profile and Playwright to exercise the actual VS Code webview; set XML_VIEWER_CODE to your VS Code executable and run xvfb-run -a npm run test:host on Linux.

Build a VSIX with npm run package after setting your Marketplace publisher ID in package.json. Publishing requires an authenticated publisher. The runtime dependencies are bundled; no runtime installation is needed. See THIRD_PARTY_NOTICES.md for their licenses.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft