title: How to read an XML resource file from my app bundle in MonoTouch / MonoGame for iOS?
body: <p>Using MonoTouch/MonoGame, I am trying to include a custom XML file in my app bundle for use in my code, but I'm not familiar with the right way to go about it. I have included the XML file in my project and marked it as "Content" so it should be copied over to the app bundle.</p>
  
  <p>In this case, I want to load some map data in XML I have defined (the XML format is prescribed, so I can't change it), while preserving the ability to also run the same code under XNA on the PC. I haven't been very lucky at finding the right mechanism on iOS yet. I would have expected something like the following, but the mapPath is coming up null (probably I'm just misunderstanding the correct use of the API).</p>
  
  <pre><code>#if WINDOWS
  Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream("MyApp.Maps." + map + ".xml");
  #else
  string mapPath = NSBundle.MainBundle.PathForResource(map,"xml");
  Stream s = new FileStream(mapPath, FileMode.Open, FileAccess.Read);
  #endif 
  </code></pre>
  
  <p>Any tips?</p>