title: Getting custom XMP metadata using metadata-extractor in c#
body: <p>I am writing some XMP metadata using a photoshop .jsx script using :</p>
  
  <p><code>var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);
   XMPMeta.registerNamespace(nameSpace, nsPrefix);</code></p>
  
  <p>and then adding some data to this new namespace. I am able to view it in Photoshop by checking under <code>File -&gt; FileInfo</code>. My question is how can I access this data using the metadata extractor library in my c# project ? When I use the following code I do not see the new metadata I added inside any of the directories:</p>
  
  <p><code>FileStream OriginalFile = new FileStream("C:\\Users\\av\\Desktop\\test.tif",  FileMode.Open, FileAccess.Read, FileShare.Read);
   IEnumerable&lt;MetadataExtractor.Directory&gt; directories = ImageMetadataReader.ReadMetadata(OriginalFile);</code></p>
  
  <p><strong>Edit:</strong>
  I am able to loop through all the properties but when I try to do </p>
  
  <p><code>var xmpDirectory = ImageMetadataReader.ReadMetadata("path/test.tif").OfType&lt;XmpDirectory&gt;().FirstOrDefault();
  xmpDirectory.XmpMeta.GetProperty("http://ns.adobe.com/xap/1.0/mm/xmpMM:DerivedForm/", "stRef:documentID")</code></p>
  
  <p>I get an exception. The property is present when I look at it through Photoshop. </p>
  
  <p><a href="https://i.stack.imgur.com/8dgTH.png" rel="nofollow">xmp data in photoshop</a></p>