nl_tokens: Convert XML to JSON
pl_tokens: function ( file ) { var xml = file . contents ; var xmlDoc = libxmljs . parseXml ( xml ) ; var rootNode = xmlDoc . root ( ) ; var resourceObject = { } ; var valueNodes = rootNode . find ( "data" ) ; valueNodes . forEach ( function ( element ) { var name = element . attr ( "name" ) . value ( ) ; var value = element . get ( "value" ) . <mask> ( ) ; resourceObject [ name ] = value ; } ) ; return JSON . stringify ( resourceObject ) ; }