diff --git a/scripts/extract-elx/extract-elx.js b/scripts/extract-elx/extract-elx.js index 577f975..d5c5218 100644 --- a/scripts/extract-elx/extract-elx.js +++ b/scripts/extract-elx/extract-elx.js @@ -486,6 +486,14 @@ async function processArrayProperty(outputPath, propertyName, arr) { } else if (typeof item === 'object' && item !== null) { fileInfo = await saveJsonProperty(dirPath, itemName, item); indexData.itemTypes.push({ index: originalIndex, type: 'json', fileName: `${itemName}.json` }); + // Additional processing for some items (e.g. extract XML from strings inside objects) + for (const [key, value] of Object.entries(item)) { + if (typeof value === 'string' && isXmlContent(value)) { + const xmlFileName = `${itemName}_${key}`; + const xmlFileInfo = await saveStringProperty(dirPath, xmlFileName, value); + result.files.push(xmlFileInfo.filepath); + } + } } else { fileInfo = await saveJsonProperty(dirPath, itemName, item); indexData.itemTypes.push({ index: originalIndex, type: typeof item, fileName: `${itemName}.json` });