first commit

This commit is contained in:
spiduler
2021-07-13 16:53:42 +09:00
commit db05b73e5b
14 changed files with 624 additions and 0 deletions

20
config/xmlParserConfig.js Normal file
View File

@@ -0,0 +1,20 @@
const he = require('he')
module.exports = {
"attributeNamePrefix": "@_",
"attrNodeName": "attr", //default is 'false'
"textNodeName": "#text",
"ignoreAttributes": true,
"ignoreNameSpace": false,
"allowBooleanAttributes": false,
"parseNodeValue": true,
"parseAttributeValue": false,
"trimValues": true,
// "cdataTagName": "__cdata", //default is 'false'
"cdataPositionChar": "\\c",
"parseTrueNumberOnly": false,
"arrayMode": false, //"strict"
"attrValueProcessor": (val, attrName) => he.decode(val, { isAttributeValue: true }),//default is a=>a
"tagValueProcessor": (val, tagName) => he.decode(val), //default is a=>a
"stopNodes": ["parse-me-as-string"]
}