title: OpenXML - Get Image Alt Text Title
body: <p>I am attempting to iterate through the images in a PowerPoint presentation using OpenXML.</p>
  <p>I have worked out how to do that.</p>
  <p>I am now attempting to get the Images Alt-Text Title....</p>
  <p>Here is my code:</p>
  <pre><code>List&lt;ImagePart&gt; imageParts = new List&lt;ImagePart&gt;();
  
  part.GetPartsOfType&lt;ImagePart&gt;(imageParts);
  
  foreach (ImagePart imagePart in imageParts)
  {
      if (imagePart != null)
      {
  
      // Get the Relationship Id
      string oldRelID = part.GetIdOfPart(imagePart);
  
      // Get the Alt-Text Tile relating to this image
  
      }
  }
  </code></pre>
  <p>Any OpenXML experts out there that could give me some pointers?</p>
  <p>Thanks</p>
  <p>UPDATE:</p>
  <p>I have tried iterating through the XML but when there are multiple images on the slide I am getting the incorrect value for title for the relating image.</p>
  <p>I think I need to be able to use the ImagePart Id to then find the corresponding title</p>
  <p>The code below gets the titles out of order...</p>
  <pre><code>foreach (ImagePart imagePart in imageParts)
  {
      string mapReference = &quot;&quot;;
  
      XmlNode thisNode = pictureNodeList[imageCounter];
  
      foreach (XmlNode xmlnode in thisNode)
      {
          foreach (XmlNode xmlchildnode in xmlnode)
          {
              foreach (XmlAttribute att in xmlchildnode.Attributes)
              {
                  if (att.Name == &quot;title&quot;)
                  {
                      mapReference = att.Value;
                      imageCounter += 1;
                   }
              }
           }
      }
  }
  </code></pre>