@appirio/metadata-builder
v1.1.3
Published
Module for writing Salesforce Metadata XML from object
Downloads
10
Keywords
Readme
Module for Writing / Formatting Salesforce Metadata XML
For use with js objects created from metadata by xml2js
Example Usage
const parseString = require('xml2js').parseString;
const build = require('metadata-builder')
//XML File of Metadata
const xml = fs.readFileSync('./src/objects/Test__c.object', {encoding: 'UTF8'});
parseString(xml, (err, result) => {
//result = javascript object of metadata xml
//formatted xml string
var xmlString = build(result);
fs.writeFile('./src/objects/Test_Modified__c.object', xmlString);
});