Skip to content

XML

Bases: Templater

__init__(source)

Initialisation of the XML Parser

Parameters:

  • source (str) –

    the text of the XML file

template(template_engine, keywords)

This method is used to template an element, by identifying it by its key and using the template engine to template it.

Parameters:

  • template_engine (TemplateEngine) –

    template engine that is used to template the embed

  • keywords (Dict[str, Any]) –

    keywords that are used to template the embed

Returns (str): templated embed