var fs=require('fs');
var xml2js = require('xml2js');

let strUrl="db://assets/textures/aa.plist";
let plistString=fs.readFileSync(Editor.url(strUrl, 'utf8'),'utf8');
let parseString=xml2js.parseString;
parseString(plistString,function(err,result){
	if(result.plist.dict){
		Editor.log(result.plist.dict[0]);
	}
});

readFileSync()说明:http://nodejs.cn/api/fs.html#fs_fs_readfilesync_path_options
xml2js 文档:https://www.npmjs.com/package/xml2js

相关文章:

  • 2021-07-28
  • 2022-01-09
  • 2022-12-23
  • 2021-11-17
  • 2021-06-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案