title: Parsing arxml file with python
body: <p>I have a file I need to parse, I need the information. The order of parsing is important.</p>
  
  <ol>
  <li>I can parse the file and get the information, but not in the sequence.</li>
  <li>How can I parse the information <code>&lt;MSR-QUERY-ARG SI="HtmlAnchor"&gt;</code>?</li>
  </ol>
  
  <p>Btw: Where can I upload the arxml file?</p>
  
  <p>File-Download: <a href="https://drive.google.com/open?id=18VJXpZR8-uEtVAHZoPA37Pc1rQHqLzbE" rel="nofollow noreferrer">ARXML-FILE</a></p>
  
  <pre><code>from xml.etree import ElementTree as ET
  import csv
  
  fpath = "test.arxml"
  
  tree = ET.parse(fpath)
  root = tree.getroot()
  
  ns = {'ns':'http://autosar.org/schema/r4.0'}
  
  for arpackage in tree.findall('.//ns:CHAPTER/ns:TRACE',namespaces=ns):
      print(arpackage.findall('.//ns:SHORT-NAME', namespaces=ns)[0].text)
  
  for arpackage in tree.findall('.//ns:CHAPTER/ns:MSR-QUERY-P-1', namespaces=ns):
      print(arpackage.findall('.//ns:MSR-QUERY-ARG', namespaces=ns)[0].text)
  </code></pre>