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 a 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
23.1.0 - 2023-08-03
Initial release!
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-23.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdf94ddedff3dad3836c9b65a3a5ff33e8d6888ee5d202d01fe6e11155c11577 |
|
MD5 | d14dfacad1ac11403f810d378f7afab2 |
|
BLAKE2b-256 | 84b56589e7e7175654155d96f93647140e6425460cc5b75554d417ddc2aa0d5c |
Close
Hashes for jinjanator_plugin_format_xml-23.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ce4b255e5fc6dedb84982e741423e186d04256145473e8c4bed48047ee98441 |
|
MD5 | 6f59d8bf14718b49221642a0a9793b33 |
|
BLAKE2b-256 | 08b097b11a3d0c40cdc6ba9aac5589220bc6d016ed960cec58bc70201cb59823 |