XPath Struktur als Eingabe und als Ergebnis

Im Folgenden eine Mapping Funktion, welche den Wurzelknoten des Dokumentes übergeben bekommt, aus diesem die Dokumentstruktur ausliest und dann eine XPath Struktur zurückgibt.

namespace eBiss
{
    public class Excel : IMapFunctionExtender
    {
        [MappingFunction]
        public System.Xml.XPath.XPathNodeIterator FlipColumns(System.Xml.XPath.XPathNodeIterator itc)
        {
            XPathNodeIterator returnValue = null;
            if (itc != null && itc.MoveNext() == true)
            {
                eBiss.Api.XPath.PathNavigator pathNavigator = (eBiss.Api.XPath.PathNavigator)itc.Current;
 
                Dampfturbine_Meldedaten meldedaten = (Dampfturbine_Meldedaten) pathNavigator.CurrentInstance;
 
                MachinesRoot machineTypeRoot = new MachinesRoot(meldedaten);
 
                returnValue = machineTypeRoot.AsPathNodeIterator()
            }
 
            return returnValue;
        }
    }
}