title: New line formatting using xml in python 3
body: <p>I am trying to write a program which will get information from an xml in the form of questions and answers. When getting the data from the xml below and putting the data into a dictionary I get this</p>
  
  <p>XML:</p>
  
  <pre><code>&lt;data&gt;
      &lt;subject name="Geography"&gt;
          &lt;easy&gt;
              &lt;question&gt;What is the capital of England?
                  &lt;option1&gt;London&lt;/option1&gt;
                  &lt;option2&gt;Bristol&lt;/option2&gt;
                  &lt;answer&gt;1&lt;/answer&gt;
              &lt;/question&gt;
          &lt;/easy&gt;
      &lt;/subject&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>Dictionary made:</p>
  
  <pre><code>{'What is the capital of England?\n                ': ['London', 'Bristol', '1']}
  </code></pre>
  
  <p>Is there any way to eliminate the new line and the white space from within the xml file while being able to keep the same indentation on the file, or must I remove the extra line and whitespace in python?</p>
  
  <p>The code I am currently using to import the data is as follows:</p>
  
  <pre><code>def getQuestions(topic, difficulty, xmlFile):
      tree = et.parse(xmlFile)
      root = tree.getroot()
      questions={}
      for i in root.findall('.//*[@name="'+topic+'"]/'+difficulty+'/question'):
              #print(i.text)
              questions[i.text]=[]
              for j in i:
                  questions[i.text].append(j.text)
      return questions
  </code></pre>
  
  <p>Any help is greatly appreciated</p>