I want to extact lines from an xml that are between from my xml. Here is an example:
<userData code="viPartListRailML" value="1">
            <partRailML s="0.0000000000000000e+00" id="0"/>
            <partRailML s="2.0000000000000000e+01" id="1"/>
            <partRailML s="9.4137883373059267e+01" id="2"/>
        </userData>
Here is my code, that I was trying:
import re
shakes = open("N:\SAJAT_MAPPAK\IGYULAVICS\/adhoc\pythonXMLread\probaxml\github_minta.xml", "r")
for x in shakes:
    if "userData" in x:
        print x
        continue
    if "/userData" in x:
        break
The problem is that it still gives back only the lines that contain <userData or </userData>
How to modify it to get the lines between these two "words"
 
     
     
    