fix: disable stripping on XML parsing
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ export async function* parseXmls(stream: ReturnType<typeof glob.stream>) {
|
|||||||
for await (const file of stream) {
|
for await (const file of stream) {
|
||||||
const fileName = typeof file === 'string' ? file : file.fullpath();
|
const fileName = typeof file === 'string' ? file : file.fullpath();
|
||||||
const xmlString = await fs.promises.readFile(fileName, 'utf-8');
|
const xmlString = await fs.promises.readFile(fileName, 'utf-8');
|
||||||
const xml = new XMLParser({ ignoreAttributes: false, allowBooleanAttributes: true }).parse(xmlString);
|
const xml = new XMLParser({ ignoreAttributes: false, allowBooleanAttributes: true, trimValues: false }).parse(xmlString);
|
||||||
yield { fileName, xml };
|
yield { fileName, xml };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user