title: In-line C# for BizTalk Scripting Functoid
body: <p>For the XML below, how can I use in-line C# in a scripting functoid to get the value of type where the element = 'SAON'?
  For info, this is comes from a record within my source schema, the record contains encoded XML which I first of all convert to an XML document.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;LocationXML&gt;
        &lt;Location&gt;
           &lt;Element&gt;PAON&lt;/Element&gt;
           &lt;type&gt;a&lt;/type&gt;
        &lt;/Location&gt;
        &lt;Location&gt;
           &lt;Element&gt;SAON&lt;/Element&gt;
           &lt;type&gt;b&lt;/type&gt;
        &lt;/Location&gt;
  &lt;/LocationXML&gt;
  </code></pre>
  
  <p>In-line C#:  This comes from an app I built previously, not been tested in the map as yet but I suspect it's not a million miles away.</p>
  
  <pre><code>string s = NewValueXml;
  
   XmlDocument x = new XmlDocument();
   x.LoadXml("&lt;root&gt;" + s + "&lt;/root&gt;");
  return x.InnerText;
  </code></pre>