title: Parsing XML using Python to print values
body: <p>I have an XML file that contains file names and file extensions that are commonly associated with ransomware and malware.  </p>
  
  <p>Using Python, I want to parse the "Pattern Value" to simply print the value that is contained inside of "Pattern Value".  The goal is to output to a simple text file where on each line it displays a file name or file extension. </p>
  
  <p>I tried to use macros in Notepad++ but that was a failure.  I'm a Python noob and I'd like to accomplish this using Python</p>
  
  <p>Below is the XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;Root &gt;
      &lt;Header DatabaseVersion = '2.0' &gt;&lt;/Header&gt;
      &lt;QuotaTemplates &gt;&lt;/QuotaTemplates&gt;
      &lt;DatascreenTemplates &gt;&lt;/DatascreenTemplates&gt;
      &lt;FileGroups &gt;
          &lt;FileGroup Name = 'Anti-Ransomware%sFile%sGroups' Id = '{367CFFB7-DDED-4AA8-8E17-203B6B97F411}' Description = '' &gt;
              &lt;Members &gt;
                  &lt;Pattern PatternValue = '!!%sRETURN%sFILES%s!!.txt' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!%sHOW%sTO%sDECRYPT%sFILES%s!!!.txt' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!%sREAD%sTHIS%s-%sIMPORTANT%s!!!.txt' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!!!ATENÇÃO!!!!!.html' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!!!SAVE%sYOUR%sFILES!!!!.txt' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!-WARNING-!!!.html' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!-WARNING-!!!.txt' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!GetBackData!!!.txt' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!README!!!*.rtf' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!READ_TO_UNLOCK!!!.TXT' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!!!SAVE%sYOUR%sFILES!.bmp' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!##%sDECRYPT%sFILES%s##!.txt' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!#_DECRYPT_#!.inf' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!DMALOCK3.0*' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!Decrypt-All-Files-*.txt' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!Please%sRead%sMe!.txt' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!READ.htm' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!Recovery_*.html' &gt;&lt;/Pattern&gt;
                  &lt;Pattern PatternValue = '!Recovery_*.txt' &gt;&lt;/Pattern&gt;
                  &lt;etc.../&gt;
              &lt;/Members&gt;
          &lt;/FileGroup&gt;
      &lt;/FileGroups&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>Again, the goal is to output each file name/file extension in a text file on a new line.  For example</p>
  
  <pre><code>test.malware
  test.ransomware 
  test.virus
  etc
  etc
  etc
  </code></pre>
  
  <p>Thank you in advance for your assistance</p>