XML Templates

The Wolfram Language has a rich mechanism for defining and applying XML templates. These templates can be used in HTML and other forms of XML. The XML tagging system supported by the Wolfram Language is set up to be compatible with XML standards and transformation tools.

XMLTemplate set up an XML template

TemplateApply apply an XML template

XML Tags

<wolfram:slot> slot to be filled when the template is applied (TemplateSlot)

<wolfram:expr> expression to be evaluated (TemplateExpression)

<wolfram:if> content to include if a test is true (TemplateIf)

<wolfram:which> content chosen using nested if-else clauses

<wolfram:sequence> block of content to repeat (TemplateSequence)

<wolfram:with> replacements to be used when the template is applied (TemplateWith)

<wolfram:template> nested template, potentially with different options

<wolfram:get> content to get from a file or URL

<wolfram:comment> comment to be ignored

<wolfram:verbatim> verbatim XML to include

XML Attributes

values list or association to iterate over with <wolfram:sequence>

separator separator between blocks in <wolfram:sequence>

test test to use in <wolfram:if>

path path to use in <wolfram:get>

inserter, combiner settings for InsertionFunction, CombinerFunction