jinjanator-plugin-format-xml 24.1.0

Creator: bradpython12

Last updated:

Add to Cart

Description:

jinjanatorpluginformatxml 24.1.0

jinjanator-plugin-format-xml: Provides XML format (data input) support for jinjanator
This plugin allows jinjanator to parse XML data for processing in
templates. The format can be selected using --format xml or
autoselected by using a data file with a name ending with .xml.
Installation
pip install jinjanator-plugin-format-xml

Usage
Suppose you have an NGINX configuration file template, nginx.j2:
server {
listen 80;
server_name {{ nginx.hostname }};

root {{ nginx.webroot }};
index index.htm;
}

And you have an XML file with the data, nginx.xml:
<nginx>
<hostname>
localhost
</hostname>
<webroot>
/var/www/project
</webroot>
</nginx>

This is how you render it into a working configuration file:
$ jinjanate nginx.j2 nginx.xml > nginx.conf

Options

process-namespaces: configures the XML parser to replace namespace
references in element names with the corresponding namespaces from
xmlns attributes in the top-level element in the document.

Release Information
Changes

Upgraded to version 24.1 of jinjanator-plugins.


→ Full Changelog

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.