strxml

1.0.0 • Public • Published

Build Status

strxml

Create xml with strings and concatenation.

install

npm install --save strxml

api

  • tag(el, [attributes], contents)
  • tagClose(el, attributes)
  • encode(str)
  • attr(attributes)

example

 
var tag = require('xmlstr').tag;
 
tag('Layer',
    tag('StyleName', 'style-' + i) +
    tag('Datasource', {
      name: 'layer-' + i,
      srs: WGS84
    }));

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    66
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    66
  • 0.0.0
    6,104

Package Sidebar

Install

npm i strxml

Weekly Downloads

6,170

Version

1.0.0

License

ISC

Last publish

Collaborators

  • mapbox-admin