Skip to content

Commit 078bd3e

Browse files
committed
fix: 更新XMLParser配置
1 parent a204537 commit 078bd3e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sdk/util.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
var fs = require('fs');
44
var crypto = require('crypto');
55
var { XMLParser, XMLBuilder } = require('fast-xml-parser');
6-
var xmlParser = new XMLParser({ ignoreAttributes: true });
6+
var xmlParser = new XMLParser({
7+
ignoreDeclaration: true, // 忽略 XML 声明
8+
ignoreAttributes: true, // 忽略属性
9+
parseTagValue: false, // 关闭自动解析
10+
});
711
var xmlBuilder = new XMLBuilder();
812

913
function camSafeUrlEncode(str) {

0 commit comments

Comments
 (0)