How to use the xml.replace function in xml

To help you get started, we’ve selected a few xml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github coreybutler / node-windows / lib / winsw.js View on Github external
{
      xml.push({
        serviceaccount: [
          {domain: config.logOnAs.domain},
          {user: config.logOnAs.account},
          {password: config.logOnAs.password}
        ]
      });
    }

    // if no working directory specified, use current working directory
    // that this process was launched with
    xml.push({workingdirectory: config.workingdirectory || process.cwd()});

    // indent resultant xml with tabs, and use windows newlines for extra readability
    return require('xml')({service:xml}, {indent: '\t'}).replace(/\n/g,'\r\n');
  },