Skip to content
Input
XML
Limit
1 MiB
Runtime
Browser

Insert an XML fragment at a selected element

Select a parent element with the safe path subset, parse a standalone fragment, and insert it at an explicit child position in the local document tree.

Local processingNo sign-upNo network access

Insert XML fragment

Inputs are limited to 1 MiB and stay in this browser tab.

Paste or edit the source. Tool Swim does not upload or save it.

Enter one bounded fragment to parse and insert. DTD and entity declarations are prohibited.

Use the documented / or // element-step subset, such as /catalog. This is not XPath.

Updated XML

Nothing is placed in a URL, account, or remote log.

What this tool does

XML 1.0, bounded, and local

Insertion is structural rather than string concatenation. The host document and fragment are parsed independently, selected parents are bounded, and namespace conflicts must be resolved before serialization.

Parsing prevents broken concatenation

The operation rejects malformed host or fragment input before insertion. It never performs placeholder expansion, templating, XInclude processing, or URL retrieval.

Namespace context needs review

A fragment can carry declarations or depend on a prefix. Inspect the output so every qualified name remains bound to the intended namespace after it enters the host tree.

Primary references

Questions and answers

Related XML tools