eBiss 3

Hilfe & Dokumentation

Benutzer-Werkzeuge

Webseiten-Werkzeuge


transformation:mappings:funktionen:custom:flipcolumns

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)
            {
                MapDocNavigator mapNav = itc.Current as eBiss.ClassLib.Maps.MapDocNavigator;
                if (mapNav != null)
                {
                    Dampfturbine_Meldedaten meldedaten = mapNav.CurrentElement.Instance as Dampfturbine_Meldedaten;
 
                    if (meldedaten != null)
                    {
                        MachinesRoot machineTypeRoot = new MachinesRoot(meldedaten);
 
                        returnValue = machineTypeRoot.AsPathNodeIterator()
                    }
                }
            }
 
            return returnValue;
        }
    }
}
transformation/mappings/funktionen/custom/flipcolumns.txt · Zuletzt geändert: 2024/02/20 08:15 von 127.0.0.1