Blog
← ブログに戻る

Understanding XML Structure and Delimited Text

December 03, 2026 1543 words
Understanding XML Structure and Delimited Text — guide on Delimiter.site

A file opens without an error, yet half the information has landed in the wrong columns. Product codes have lost their leading zeros. A description containing a comma has become two separate fields. These problems often begin with a simple misunderstanding: XML and delimited text organize information differently. Once you can read those differences, you can make better conversion choices and catch mistakes before they reach a spreadsheet, website, or customer database.

The Structure Check: XML describes information through named elements, attributes, and relationships. Delimited text arranges information into records and fields separated by agreed characters. Moving between them requires a clear mapping, especially when one record contains several related items. Keep an untouched original, test a small sample, and compare the exported values with your source. A file that opens successfully still needs checks for missing fields, changed identifiers, broken characters, and lost relationships.

How XML Gives Information a Shape

XML stands for Extensible Markup Language. It uses tags to identify pieces of information. Those tags describe the role of a value rather than its appearance on a screen. A tag named <price> tells a reader or application that the enclosed text represents a price.

Here is a small example:

<products>
  <product id="00127">
    <name>Desk Lamp</name>
    <price currency="USD">24.50</price>
    <description>Compact, adjustable lamp</description>
  </product>
</products>

The document has one root element, products. Inside it sits a product element. That product contains several child elements. Its id attribute stores an identifier, while the currency attribute adds context to the price.

Opening and closing tags must match, including letter case. Elements must also close in the correct order. The XML specification defines these structural requirements. An XML parser checks this syntax before an application can reliably work with the document.

Indentation makes the relationships easier for people to read. It does not replace the tags. Removing decorative indentation generally leaves the same element relationships, although whitespace inside actual content can matter.

Special Characters Need Care

Some characters have a structural meaning in XML. An ampersand in ordinary text usually needs to appear as &amp;. A less-than sign in text needs &lt;. For example, the company name “Paper & Pens” would be stored inside an element as Paper &amp; Pens.

Use an XML-aware exporter to handle these characters. Manually replacing symbols across a document can damage valid content or escape text twice. The readable value after parsing should still match the original value.

How Delimited Text Organizes Rows and Fields

Delimited text uses a separator character to divide fields. CSV commonly uses commas. TSV uses tabs. Other files use semicolons or vertical bars. Each record usually represents one item, and each field holds one value associated with that item.

The same product could appear in CSV as:

id,name,price,currency,description
00127,Desk Lamp,24.50,USD,"Compact, adjustable lamp"

The first record supplies column names. The next record supplies values in that order. Unlike XML, the individual values do not carry surrounding tags. Their position connects them to the header.

The quotation marks around the description have a purpose. Its comma belongs to the description and must not create another field. The CSV format guidance documents quoting for fields containing commas, double quotes, or line breaks. A double quote inside a quoted field is represented by two consecutive double quotes.

This explains why replacing every comma with a tab can break a CSV file. Some commas separate fields. Others belong inside values. A reliable conversion must recognize that difference.

Choose a Format That Matches the Destination

Your destination application should guide the format choice. A spreadsheet import may expect flat rows. A publishing system may require XML with specific element names. Changing a file extension does not change its internal structure.

What Each Format Handles Naturally

Requirement XML Delimited Text
Simple records with consistent fields Uses repeated elements with named values Fits naturally into rows and columns
Several related items within one record Can preserve parent and child relationships Needs a chosen layout or separate related files
Meaning of individual fields Expressed through element and attribute names Depends on column order and accompanying definitions
Import compatibility May require a particular schema and namespace May require specific separator, quoting, and encoding settings

Neither format automatically defines every business rule. A field named price does not tell you whether tax is included. A column named date does not explain whether 04/05/2026 means April 5 or May 4. Keep those definitions beside the file.

Plan the Mapping Before Converting

Conversion is straightforward when every XML record has the same single-value fields. It becomes more involved when a product has several categories, an order has several items, or a customer has several addresses.

Suppose one order contains three items. One CSV row per item produces three rows with the same order identifier. One row per order requires another way to represent those items. Numbered columns can become awkward as item counts grow. Separate order and item files, connected through identifiers, may be a better fit.

Make these decisions before running the conversion:

  • Define what one output record represents.
  • Map each required element and attribute to a named field.
  • Choose how repeated values and related records will be represented.
  • Decide whether missing values and empty values need different treatment.
  • Record the expected encoding, delimiter, date format, and identifier rules.

XML can distinguish an absent element from an existing empty element. A plain CSV export may represent both as an empty field. If that distinction affects your workflow, preserve it through a status column or another documented convention.

Fit Browser Tools Into a Small, Controlled Workflow

A free browser-based service fits naturally when you need to work with a small, non-sensitive sample without building a script. A structured data converter can serve as a starting point for that task. Check its available input and output options against your actual file before relying on it for a complete conversion.

Prepare the structure first. Browser access does not remove the need to decide how attributes, repeated elements, and missing values should travel into the output. A preview is useful only when you know what the result should contain.

  1. Save the original. Work from a copy and use a different filename for each exported version.
  2. Create a representative sample. Include ordinary records and difficult values, including quotes, accented characters, empty fields, and repeated items.
  3. Confirm the destination requirements. Check accepted formats, field names, separator settings, and encoding.
  4. Apply the mapping. Select supported conversion settings or prepare the records in the layout your destination expects.
  5. Inspect the exported text. Check actual values before opening the result in software that may reinterpret them.
  6. Test an import. Use a preview or test environment, then compare imported records against the sample.

For recurring exports, large datasets, or complicated relationships, a repeatable local workflow may be easier to audit. Keep the mapping documented so another person can reproduce the same result.

Check Privacy Before Pasting Real Records

Running a service in a browser does not prove that processing stays on your device. Review its privacy information and any explanation of uploads, retention, and processing. Avoid assuming that free access means confidential handling.

For an initial test, replace names, email addresses, account numbers, and private notes with fictional values. Preserve the structure and difficult characters. A fabricated description containing a comma tests quoting without exposing a customer's order.

If you cannot establish how a service handles data, use an approved local tool for confidential files. Workplace policies may also limit where business records can be processed.

Validate Syntax and Check Meaning Separately

XML syntax validation answers whether the document follows XML's structural rules. Schema validation, when a relevant schema is available, checks additional requirements. These may include allowed elements, their order, and declared value types.

Neither check guarantees that an address belongs to the correct customer or that a price is accurate. Those questions need checks against the original records and your business rules.

Delimited output needs its own inspection. Confirm consistent field counts using a parser that understands quoting. Counting visible lines can be misleading because one quoted CSV field may contain several line breaks.

Protect Values From Automatic Changes

Spreadsheet software may interpret identifiers as numbers. The value 00127 can become 127. Long identifiers can lose precision, and date-like text may be reformatted. During import, set identifier columns to text and review date handling explicitly.

Check encoding too. UTF-8 is a common choice, but the receiving application must read it correctly. Inspect accented names, currency symbols, and non-Latin text. Garbled characters are a reason to stop and fix the import settings.

Compare record counts according to your mapping. Ten orders can correctly produce thirty item rows. Reconcile the order identifiers and item counts instead of expecting every conversion to retain the same number of rows.

Keep the Structure Behind the Values

A successful conversion preserves the information your next task needs. That includes values, relationships, identifiers, and the rules used to interpret them. Keep the original file, the mapping notes, and a checked output sample together.

Before handing over the result, ask whether another person could import it without guessing. Clear headers, documented settings, and a verified sample make that possible. Understanding the structure gives you a dependable way to move information between XML, delimited files, and the tools you use every day.

Try it yourself. Everything in this guide works with the free all the text tools — no sign-up, and nothing you paste is stored. Browse all text tools or jump to counters and list clean-up.
Keep reading