first commit
This commit is contained in:
20
config/xmlParserConfig.js
Normal file
20
config/xmlParserConfig.js
Normal 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"]
|
||||
}
|
||||
Reference in New Issue
Block a user