mirror of
https://github.com/vatesfr/xen-orchestra.git
synced 2026-09-10 22:14:48 -05:00
docs(xml-rpc): don't normalize or trim whitespaces when parsing XML
This commit is contained in:
@@ -121,7 +121,8 @@ const xml = `
|
||||
</methodResponse>
|
||||
`
|
||||
|
||||
const tree = parseXml(xml)
|
||||
// do not normalize or trim whitespaces as it will break string values
|
||||
const tree = parseXml(xml, { normalize: false, trim: false })
|
||||
|
||||
// it can now be passed to the XML-RPC parser
|
||||
xmlRpcParser.parse(tree)
|
||||
|
||||
@@ -139,7 +139,8 @@ const xml = `
|
||||
</methodResponse>
|
||||
`
|
||||
|
||||
const tree = parseXml(xml)
|
||||
// do not normalize or trim whitespaces as it will break string values
|
||||
const tree = parseXml(xml, { normalize: false, trim: false })
|
||||
|
||||
// it can now be passed to the XML-RPC parser
|
||||
xmlRpcParser.parse(tree)
|
||||
|
||||
Reference in New Issue
Block a user