Some channels publish an exact XML layout, with nested blocks, attributes on tags (<price currency="USD">) or one element per image. With the Custom XML template you build that custom XML feed node by node in a visual tree and see the result for a real product while you work, so you don’t have to write the markup yourself.
This feature requires CTX Feed Pro. In the free plugin, Custom XML is still listed under Template, and the builder opens as a locked preview on a sample document, so you can see how it works. Building and saving a Custom XML feed needs Pro.

When you need a custom XML feed
Use a ready-made channel template (Google Shopping, Facebook Catalog and so on) whenever one exists for your channel. Reach for Custom XML when the channel needs a layout no template covers:
- Custom XML: any structure, built in a visual tree with a live preview. It handles nested groups, tag attributes, loops over images, categories or variations, and conditions on single elements.
- Custom Template 1: a flat list where you only choose the element names. See Configure XML Feed.
- Custom Template 2: markup you write by hand with shortcodes (also Pro).
Set up the feed
- Open CTX Feed → Make feed.
- In Feed settings, set Template to Custom XML.
- Give the feed a File name and choose the Country, Include variations and Update interval as for any feed.

- Template: Custom XML (the hint reads “Node-tree editor, no attribute table”).
- File type: always XML for this template.
- Header: the lines written before the first tag. It starts with the XML declaration
<?xml version="1.0" encoding="UTF-8"?>. You can add processing instructions or comments, one per line, or leave it empty for no header. Elements and a DOCTYPE are not allowed here, and the encoding is always UTF-8.
Start the document
Open the Config tab. Instead of the attribute table you get the Node tree, with two ways to start:

- Empty document: a
<products>wrapper with aproductloop that repeats for each product, holdingidandtitle. - Import sample XML: paste a feed your channel accepts, or upload the file (up to 1 MB). One or two products are enough.

When you import a sample, CTX Feed:
- finds the repeated product element and turns it into the product loop;
- maps fields it recognises by name (for example
id,title,price,gtinorean,brand) to the matching product attributes. Any field it can’t match keeps its tag with no attribute, and the tree marks it so you can pick one; - turns repeated image or category elements into loops, and keeps everything outside the products as fixed text.
Importing replaces the structure in the editor. Nothing is saved until you save the feed.
The builder

- Node tree: the whole document. Each row shows its type (GRP group, LOOP, EL element, CDATA when the value is wrapped in CDATA) and, on the right, the attribute it outputs or what a loop repeats. IF means the node has a condition. A warning triangle means the node needs attention: Not a valid XML name. or Choose an attribute. Use Filter nodes to find a node in a large document.
- Add inside: type a name, choose Element, Group or Loop, and click Add. The new node goes inside the selected node. An element can’t hold other nodes, so when an element is selected the new node goes into its parent.
- Node settings: everything about the selected node (see the next section).
- Preview: the whole file rendered for one real product, with the selected node’s lines highlighted. Well-formed confirms the XML is valid. Click first product of N to preview a different product, and Use the first product to go back.
There are three kinds of node:
- Element: one tag with a value, such as
<title>V-Neck T-Shirt</title>. - Group: a tag that only wraps other nodes, such as
<pricing>…</pricing>. - Loop: a tag repeated for Each product, Each variation, Each image or Each category. A document has exactly one loop over products, and product values only work inside it.
Configure a node

- Name, type and Remove node: the tag name must be a valid XML name. A prefix such as
g:idis fine. The top node of the document can’t be removed. - Value: choose Attribute to output a product attribute (any attribute from the list, including your dynamic attributes and attribute mappings). Choose Text for fixed text, which can include attribute placeholders such as
{title}or{price|number:2}. Inside an image or category loop, Loop item outputs the current image URL or category path. - Attributes on this node: click Add attribute to put an attribute on the tag, for example
currency=USDgives<price currency="USD">. Each attribute’s Source is Text or Attribute. A row without a name isn’t written; name it or remove it before saving. - Format: click Build to open the Command Builder, the same commands you use on a mapping row in the built-in templates: change case, remove HTML, truncate, find and replace, format numbers and dates, and more.
- Show only when: add condition groups to write this node only for products that match, for example
<sale_price>only when Sale Price is not empty. Conditions are available on the product loop and the nodes inside it. They don’t remove products from the feed; to choose which products go into the feed, use the Filters and Advanced filters tabs. - Wrap value in CDATA (off by default) and Escape special characters (on by default). Leave escaping on unless the value is already valid XML.
A node whose value is empty for a product is still written, as an empty tag such as <gtin/>; the only thing that leaves a node out is a Show only when condition the product doesn’t match.
Save and generate
- Click Save & generate. CTX Feed checks the whole structure first. If something is wrong, it lists the reasons and saves nothing.
- On Manage feeds, use Preview in the feed’s ⋮ menu to open the generated file, then copy the Feed URL into your channel.
The Filters tab settings for string replace, campaign URL parameters and number format apply to Custom XML values too.
Troubleshooting
- The Preview lists reasons above a dimmed file. The structure isn’t valid yet. Fix the nodes the reasons name; the tree marks them with a warning triangle.
- Save says “Name or remove the unfinished attribute on <node>.” An attribute row on that node has no name. Give it one or remove the row.
- A node is missing for some products. Check its Show only when condition. A node without a condition is always written, even when its value is empty.
- Save says “Custom XML is a CTX Feed Pro feature”. CTX Feed Pro isn’t active on this site, or its licence isn’t active.
- The channel rejects a tag name or namespace. Rename the node in the node card. For a namespaced name such as
g:id, add the namespace declaration as an attribute on the top node (for examplexmlns:g=http://base.google.com/ns/1.0).
Related guides
- Configure XML Feed
- Custom Template 2 PHP pattern
- Configure product images into feed
- Variable product or variations
