Azurite's XML responses alter the contents of multi-line text nodes
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 393
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
Azurite uses [`js2xmlparser`](https://www.npmjs.com/package/js2xmlparser) to convert JavaScript objects to XML, which in turn uses [`xmlcreate`](https://www.npmjs.com/package/xmlcreate). However, `xmlcreate` defaults to pretty-printing XML outputs, which indent XML nodes and _wrongly_ indents the contents of multi-line text nodes by adding spaces before each line.
This behavior can be fixed by passing either `{ format: { pretty: false } }` or `{ format: { indent: '' } }` in any appropriate `js2xmlparser.parse()` calls.
FWIW, I've submitted a new [issue in the `node-xmlcreate` project](https://github.com/michaelkourlas/node-xmlcreate/issues/7). Also, FYI, this issue was [reported in the `node-j2sxmlparser` project](https://github.com/michaelkourlas/node-js2xmlparser/issues/60), but it was dismissed.
Expected behavior (Actual Azure Storage Queue example, edited for brevity):
```xml
[...]This is a test
Another line
More lines
```
Actual Azurite Queue behavior (edited for brevity):
```xml
[...]This is a test
Another line
More lines
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.