moonfig-xml

    XML adapter for MuVirus/moonfig.

    config
    xml
    moonfig
    Download zip
    Author
    Version
    0.2.0
    License
    Apache-2.0
    Last updated
    17 hours ago
    Downloads
    10

    #moonfig-xml

    XML adapter for moonfig. It turns an XML document into moonfig's Value, so merging, extraction and validation work exactly like they do for every other format.

    This lives in its own module so that moon add MuVirus/moonfig does not drag in the XML parser. Add it only when you actually read XML.

    #Install

    moon add MuVirus/moonfig-xml

    import {
    "MuVirus/moonfig/core" @config,
    "MuVirus/moonfig-xml/xml_format" @xmlfmt,
    }

    let cfg = @config.Config::new()
    .add(@config.StringSource::new("<db><port>5432</port></db>", @xmlfmt.XmlFormat::new()))
    .build()