0
<Row ss:Index="14">
<Cell ss:StyleID="TableRowHeader" ss:Index="2">
<Data ss:Type="String">10000</Data>
</Cell>
<Cell ss:StyleID="TableRowHeader" ss:Index="3">
<Data ss:Type="String">S00001</Data>    
</Cell>
<Cell ss:StyleID="TableRowHeader" ss:Index="6">
<Data ss:Type="String">SPI-37-2018</Data>
</Cell>
<Cell ss:StyleID="TableRowHeader" ss:Index="7">
<Data ss:Type="String">02/26/2018</Data>
</Cell>
<Cell ss:StyleID="TableRowHeader" ss:Index="8">
<Data ss:Type="String">22</Data>
</Cell>
<Cell ss:StyleID="TableRowHeader" ss:Index="9">
<Data ss:Type="String">02/26/2018</Data>

I want to extract data from the specific ss:StyleId and ss:Index. Can you please suggest a way I tried print(xmlTree.find('.//Cell').attrib['ss:StyleID']), but it shows NoneType has no attrib

Varun
  • 7
  • 2
  • 1
    Possible duplicate of [How do I parse XML in Python?](https://stackoverflow.com/questions/1912434/how-do-i-parse-xml-in-python) – Kent Shikama Mar 04 '18 at 18:28
  • 1
    XML has namespaces. Please post at least root or parent tag that defines namespace prefix like *ss*. – Parfait Mar 04 '18 at 19:02
  • I have added the parent tag here. Thanks :) – Varun Mar 05 '18 at 19:03
  • Still not helpful as we do not know what *ss* is defined. I meant at least the node that defines namespace prefix. That can be parent but usually is root tag. Find `xmlns:ss`. – Parfait Mar 05 '18 at 19:12

0 Answers0