JSFiddle - React, Tailwind, and code Playground
Getting data from XML file from a specific spot while ignoring namespaces and using "local-name()" approach
by Yurii Predborskyi
JavaScript
let str = `<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>Reflex</Author>
<LastAuthor>Reflex</LastAuthor>
<Created>2011-04-29T13:20:48Z</Created>
<LastSaved>2011-04-29T16:15:19Z</LastSaved>
<Company>Telia</Company>
<Version>12.00</Version>
</DocumentProperties>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>12810</WindowHeight>
<WindowWidth>19020</WindowWidth>
<WindowTopX>120</WindowTopX>
<WindowTopY>15</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Arial"/>
<Interior/>
</Style>
<Style ss:ID="sTable">
<Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
</Style>
<Style ss:ID="sReportHeader">
<Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
<Font ss:FontName="Arial" x:Family="Swiss" ss:Size="26" ss:Bold="1" ss:Color="#990ae3"/>
</Style>
<Style ss:ID="sReportTitle">
<Alignment ss:Vertical="Bottom"/>
<Font ss:FontName="Arial" ss:Size="8" ss:Bold="1"/>
</Style>
<Style ss:ID="sColumnHeader">
<Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
<Font ss:FontName="Arial" ss:Color="#000000" ss:Bold="1"/>
<Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
</Style>
<Style ss:ID="sNumber">
<Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
<Font ss:FontName="Arial" x:Family="Swiss"/>
<NumberFormat ss:Format="General Number" />
</Style>
<Style ss:ID="sText">
<Alignment ss:Horizontal="Left"...