strxml

create xml with functions and strings

  • strxml

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
strxml
411.0.08 years ago10 years agoMinified + gzip package size for strxml in KB

Readme

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
    }));