title: PowerShell XML Parsing & Export
body: <p>I'm fairly new using PowerShell, and just joined stackoverflow.
  I have a project at work to try to parse an XML file and export some specific nodes to a csv file. 
  I need the <code>*&lt;group&gt;name"unique name"*</code> and the member task # exported from multiple entries in the file to be exported to the .csv.</p>
  
  <p>The XML file looks like the below example with several entries for <em>Group Name &amp; the associating task #:</em></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;settings&gt;&lt;tasks&gt;&lt;groups&gt;
  &lt;Group Name="some name"&gt;
  &lt;Notes&gt;Some notes here&lt;/Notes&gt;
  &lt;Member t="task"&gt;159711687&lt;/Member&gt;
  &lt;Member t="task"&gt;584643293&lt;/Member&gt;
  &lt;Member t="task"&gt;465828474&lt;/Member&gt;
  &lt;Member t="task"&gt;262255905&lt;/Member&gt;
  &lt;Member t="task"&gt;121466829&lt;/Member&gt;
  &lt;Member t="task"&gt;257067112&lt;/Member&gt;
  &lt;/Group&gt;
  
  &lt;Group Name="some name 2"&gt;
  &lt;Notes&gt;Testing&lt;/Notes&gt;
  &lt;Member t="task"&gt;865485927&lt;/Member&gt;
  &lt;Member t="task"&gt;363897901&lt;/Member&gt;
  &lt;Member t="task"&gt;848275733&lt;/Member&gt;
  &lt;Member t="task"&gt;471573148&lt;/Member&gt;
  &lt;Member t="task"&gt;312701058&lt;/Member&gt;
  &lt;Member t="task"&gt;667795378&lt;/Member&gt;
  &lt;Member&gt;160178363&lt;/Member&gt;
  &lt;Member&gt;149985003&lt;/Member&gt;
  &lt;/Group&gt;
  </code></pre>
  
  <p>so far I've gotten</p>
  
  <pre><code>$xml = [xml] (gc "\\servername\path\to\file.xml")
  $xml.settings.tasks.groups.group
  </code></pre>
  
  <p>I've also tried <strong><em>| select member -expandproperty member</em></strong> but it doesn't return the formatting correctly, and obviously that does not return the name either.</p>
  
  <p>I've also tried a basic <strong><em>| format-list name, member</em></strong>
   and format-table with little results also.</p>
  
  <p>Any pointers in the right direction for this newbie would be helpful.</p>
  
  <p>Thanks in advance.</p>