eBiss 3

Hilfe & Dokumentation

User Tools

Site Tools


en:transformation:mappings:funktionen:custom:flipcolumns

XPath structur as input and result

In the following a mapping function which gets the root node of the document, reads the document structure from it and then returns an XPath structure.

namespace eBiss
{
    public class Excel : IMapFunctionExtender
    {
        [MappingFunction]
        public 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;
        }
    }
}
en/transformation/mappings/funktionen/custom/flipcolumns.txt · Last modified: 2024/02/20 08:15 by 127.0.0.1