Plugin which provides XML format (data input) support for jinjanator
Project description
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 fromxmlns
attributes in the top-level element in the document.
Release Information
Changes
- Upgraded to version 24.1 of jinjanator-plugins.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for jinjanator_plugin_format_xml-24.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ccf36c1f1f8bdead1987bd4ebf2044256fd7369d3f12a539f3a2ad772b14864 |
|
MD5 | 46f4044e4e1144d1480c389c123957ab |
|
BLAKE2b-256 | be7e1eba273f7c722872592825c458d03c3b1b3656f5667ab6e9c517482d448b |
Close
Hashes for jinjanator_plugin_format_xml-24.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97c351ff2fcc21bc9c01b5228ef4419f8f0c41a0932fdffaa20f42df5635fc36 |
|
MD5 | 1d04c8993735683edf55bd5e952ebbb8 |
|
BLAKE2b-256 | 40a47fd988850c15a77cc9f784848691da0fc92479bae41d960ba5c59c3c7720 |