### Overview

Build xml / html / svg programatically using element building blocks.
Instead of using a templating engine, write data/markup that 'looks like' rust.

Find it on [github](https://github.com/tiby312/tagger) and [crates.io](https://crates.io/crates/tagger).

Tagger also provides functionality to build svg paths and polyline attribute data.

### Example

```rust
use tagger::prelude::*;

fn main() -> std::fmt::Result {
    use std::fmt::Write;

    let width = 100.0;
    let height = 100.0;
    let w = &mut tagger::upgrade_write(std::io::stdout());

    element!(
        w,
        "svg",
        ("xmlns", "http://www.w3.org/2000/svg"),
        ("viewBox", format_args!("0 0 {} {}", width, height))
    )
    .build(|w| {
        single_element!(
            w,
            "rect",
            ("x1", 0),
            ("y1", 0),
            ("rx", 20),
            ("ry", 20),
            ("width", width),
            ("height", height),
            ("style", "fill:blue")
        );

        element!(w, "style")
            .build(|w| write!(w, "{}", ".test{fill:none;stroke:white;stroke-width:3}"))?;

        element!(w, "g", ("class", "test")).build(|w| {
            for r in (0..50).step_by(10) {
                single_element!(w, "circle", ("cx", 50.0), ("cy", 50.0), ("r", r));
            }
            Ok(())
        })
    })
}

```




### Output


<img src="./assets/svg_example.svg" alt="demo">
