0
$\begingroup$

This is a sample from the xml file:

"tag1 start" Zalog is a formerly independent settlement in the eastern part of the capital "tag2 start" Ljubljana "tag2 finish" in central Slovenia. "tag1 finish "

The Code:

import xml.etree.ElementTree as ET
mytree = ET.parse("ReLocaR_Train.xml")
myroot = mytree.getroot()

for x in myroot:
    print(x.text)  
    for y in x:
        print(y.text)

The Output : Zalog is a formerly independent settlement in the eastern part of the capital Ljubljana None

The problem: " In central Slovenia" is missing

$\endgroup$
  • $\begingroup$ Hi @Elyas, welcome to the site. This question seems more like a programming problem than a data science question, which would make it a better fit at other stackexchange sites like stackoverflow. Also, these questions normally are expected to provide some information about what has already been tried to solve the problem. $\endgroup$ – ncasas Nov 21 at 20:00