A lean XML builder for Gleam
Gleam 100.0%
4 1 0

Clone this repository

https://tangled.org/keii.dev/xmleam
git@tangled.org:keii.dev/xmleam

For self-hosted knots, clone URLs may differ based on your setup.

README.md

xmleam#

Package Version Hex Docs

gleam add xmleam
import gleam/io
import gleam/result
import xmleam/builder.{Opt}

pub fn main() {
  let document = {
    builder.opts_cont_tag(
      "?xml",
      [Opt("version", "1.0"), Opt("encoding", "UTF-8")],
      { result.unwrap(builder.basic_tag("hello", "world"), "Encoding Error") },
    )
  }
  io.debug(document)
}

Further documentation can be found at https://hexdocs.pm/xmleam.

Development#

gleam run   # Run the project
gleam test  # Run the tests