{{ summaryTitle }}{{ summaryValue }}{{ summaryLine }}{{ badge.label }}
XML source and conversion controls
One document, up to 500,000 characters. Custom DTD entities are rejected instead of expanded.
{{ sourceActionHint }}
The selected format updates locally from the same parsed XML tree and record path.
Current resolution: {{ resolvedPathLabel }}.
Example: catalog>book.
{{ params.include_attributes ? 'Attributes kept' : 'Attributes omitted' }}
Keep this on when identifiers or labels live in start-tag attributes.
Use preserve for code, signatures, or preformatted text; collapse is useful for prose-like feeds.
{{ summaryLine }}
{{ params.coerce_scalars ? 'Typed booleans and numbers' : 'Text values preserved' }}
Leave off when identifiers, decimals, and flags must remain exact text.
The neutral default is @.
The neutral default is #text.
Two spaces is the neutral default.
rows
The neutral default shows the first 50 records.
The neutral default is xml_records.
{{ artifactAnnouncement }}
{{ outputText }}
{{ tableAnnouncement }}
{{ header }}Copy
{{ cell }}
{{ chartAnnouncement }}

XML stores information as a nested document rather than a flat sheet. Element names describe the structure, attributes attach facts to an element, and text supplies its value. That combination works well for configuration, feeds, exports, and document exchange, but the hierarchy must be interpreted before the same information can become JSON objects or table rows.

A conversion therefore begins with a choice about meaning. Keeping the full tree preserves parent-child relationships and is safest when the hierarchy matters. Selecting a repeated branch as a record path treats every matching element as one record, which is usually better for CSV, TSV, SQL, JSON Lines, or Markdown tables. Choosing an outer wrapper can collapse many useful records into one row; choosing a nested line-item path can separate details from their parent order.

XML structures and their effect on conversion
XML feature Meaning after conversion Decision to make
Repeated elements Possible records or array members Select the level that represents one useful row.
Attributes Fields attached to an element Keep them when IDs, codes, or units live in start tags.
Mixed text and child elements A text value alongside nested fields Choose a text key that cannot be confused with a real child name.
Whitespace Literal text, trimmed text, or collapsed runs Preserve it for significant content; normalize it for ordinary data fields.

Well-formed XML is not the same as a successful data model. Matching start and end tags only prove that the document can be parsed. They do not guarantee that a chosen record path is useful, that numeric-looking identifiers should become numbers, or that flattened column names will fit the destination database. A good conversion keeps the original document available until row counts, sample values, and field names have been checked.

How to Use This Tool:

Start with the destination shape, then confirm that the chosen record path represents the thing you intend to import or analyze.

  1. Paste an XML document or load it from a file, then choose Full-tree JSON or Formatted XML when the hierarchy must stay intact.
  2. Select a record-based format when each repeated element should become one row. Leave Record path on auto detect for an initial suggestion, or enter a custom path to target a specific branch.
  3. Choose whether to include attributes, preserve or normalize whitespace, and coerce scalar types. Keep coercion off when values such as product codes, leading-zero IDs, or exact decimal text must remain strings.
  4. Review the resolved path, record count, and preview before using the converted data. If the selected path matches nothing, choose another schema path rather than treating an empty result as a valid export.

Interpreting Results:

The record count should agree with a known sample or a count of the repeated XML element. The preview shows only the configured number of rows, so a short preview is not evidence that the full conversion is short. Compare a few early, middle, and late records when the source is large.

  • Check that attribute fields retain the chosen prefix and do not collide with element names.
  • Inspect nested arrays after flattening. Indexed columns such as items[0].sku preserve position but may be awkward for relational imports.
  • Treat tag-frequency and schema summaries as structural clues, not proof that the selected records contain the right business data.

Technical Details:

XML-to-record conversion is a staged transformation. Parsing first establishes one properly nested element tree. Projection then chooses either the document root or every node at a record path. Representation rules turn attributes, direct text, repeated children, and mixed content into scalar, object, or array values. Record formats add one final flattening step.

Transformation Core

Stages in the XML conversion transformation
Stage Rule Result
Parse Require one document element, legal names and characters, unique quoted attributes, and properly nested tags. An element tree or a blocking parse issue
Project Use the full root for tree output or collect every element matching the resolved record path. One document value or a record list
Represent Group repeated child names into arrays, keep attributes under the selected prefix, and place mixed text under the selected text key. Nested JSON-compatible values
Flatten Join object paths with dots and label array positions with brackets; join arrays of scalars with commas. Headers and row values for tabular formats
Serialize Apply the escaping and syntax rules for JSON, JSON Lines, CSV, TSV, SQL, Markdown, or formatted XML. The selected text format

Auto detection ranks schema paths by repeated occurrence, then by child and attribute structure, count, and depth. It is a useful first guess rather than a declaration of business meaning. A custom path may use slashes or greater-than signs; comparisons ignore namespace prefixes and letter case while the original element names remain in the converted values.

Value and Format Rules

  • Scalar coercion recognizes case-insensitive booleans and finite JSON-style numbers. It does not coerce arbitrary dates, empty strings, hexadecimal values, or numbers with leading zeros.
  • CSV doubles embedded quotation marks and quotes fields containing commas, quotes, or line breaks. TSV replaces tabs and line breaks inside values with spaces.
  • SQL identifiers are reduced to letters, digits, and underscores; identifiers beginning with a digit receive a prefix. String literals escape single quotes, while finite numbers, booleans, and null values use SQL literals.
  • Formatted XML retains element and attribute names but normalizes layout. It is not a byte-for-byte round trip and does not preserve comments, processing-instruction placement, or the original indentation.
Boundaries enforced during XML conversion
Boundary Maximum or range Effect
Source length 500,000 characters Larger documents are rejected before parsing.
Elements 20,000 Parsing stops above the limit.
Attributes 50,000 Parsing stops above the limit.
Matched records 10,000 The selected record path must be narrowed when it matches more.
Preview rows 10 to 200 Only the preview is limited; the conversion can contain more records.

Privacy and Parsing Limits:

The XML text is parsed in the browser and is not sent to a conversion service. Custom document type declarations and entity declarations are deliberately not expanded, so XML that depends on a DTD or external entity will be rejected. The parser checks well-formed structure but does not validate against an XML Schema or DTD, resolve namespace URIs, or test the converted SQL against a particular database.

Worked Examples:

Catalog records with attribute IDs

For a catalog containing repeated book elements, select catalog > book as the record path and keep attributes enabled. Each book becomes one record, an id attribute appears under the chosen attribute prefix, and nested fields such as author and price become columns. If scalar coercion is off, a price such as 12.50 remains exact text rather than the number 12.5.