Explain XML code

Paste XML and Vibe explains its structure: which elements hold which, what each attribute adds, and what &amp; and <![CDATA[ are doing there.

catalog.xml

Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.

Vibe19 lines selected

Press Explain it for the sample, or paste your own code first.

What this XML sample shows

elements and nesting
An XML file is one tree: a single root element, here <catalog>, with every other element inside it, and each opening tag closed in the right order. Tag names are case-sensitive, so <Name>Blue mug</name> stopped the parser with Opening and ending tag mismatch: Name line 7 and name.
attributes
Attributes add small facts to an element, in quotes inside its opening tag: id="mug-blue", inStock="true", currency="USD". The XPath query //product[@inStock="true"]/name/text() picked out Blue mug, and string(/catalog/@updated) read 2026-11-05.
escaping and CDATA
< and & have jobs in XML, so in text they're written &lt; and &amp;: Plates &amp; bowls set reads back as Plates & bowls set. A plain & there stopped the parser with xmlParseEntityRef: no name. Inside <![CDATA[ ... ]]> nothing is read as markup, so the description came back as the text Fits <b>4 people</b>; dishwasher safe.
schemas
A schema (.xsd) says which elements may appear, in what order and with what types. Well-formed isn't the same as valid: with the first <name> removed, the file still parsed, but the schema check said Element 'price': This element is not expected. Expected is ( name ). A price written 12,50 failed with '12,50' is not a valid value of the atomic type 'xs:decimal'.

Good to know

  • Checked with xmllint, libxml2 2.15.3: xmllint --noout catalog.xml found no errors, --schema catalog.xsd printed catalog.xml validates, and XPath counted 2 tags and summed the prices to 60.5.
  • <?xml version="1.0" encoding="UTF-8"?> is the declaration, and it has to come first. With a comment or even one blank line above it, xmllint stopped with XML declaration allowed only at the start of the document.
  • In the schema, id has the type xs:ID, so two products with id="mug-blue" failed with 'mug-blue' is not a valid value of the atomic type 'xs:ID': each ID can be used once per file.

Watch out: A comment can't contain two hyphens in a row. With check with xmllint --schema in the comment on line 2, the whole file failed to parse with Double hyphen within comment, before any element was read.

Explain XML code beside your editor

Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).

Install on Mac

curl -fsSL https://unvibe.site/install.sh | bash

Paste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.

Opening the .dmg the first time
  1. Open the .dmg and drag Unvibe to Applications.
  2. Open it once; macOS says it can't verify it. Click Done.
    macOS dialog: Unvibe Not Opened, with Done and Move to Trash
    Real screen, macOS 15
  3. System Settings › Privacy & Security › Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.
    macOS Privacy & Security, Security section: Unvibe was blocked to protect your Mac, with the Open Anyway button
    Real screen, macOS 15

The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open