Open BannerwiseMZL opened 2 years ago
@BannerwiseMZL is this still an issue? Using the latest works for me with your example xml (v1.0.4)
const flow = require('xml-flow');
const { Readable } = require('stream');
const inFile = Readable.from(['<image> <url>https://example.com/image</url> </image>']);
const xmlStream = flow(inFile);
xmlStream.on('tag:image', console.log);
The above outputs this:
{ '$name': 'image', url: 'https://example.com/image' }
Is there a reason the following XML is flattened?
`
`
result is:
{ image: 'https://example.com/image'}
And if there's a reason can I bypass that behaviour easily?