none
To mass copy selected elements using Mapper to <ANY> tag on the output side. RRS feed

  • General discussion

  • I have a batch of xml documents that has a batch related information and multiple documents. On the right side of mapper I have canonical schema that defines <Any> . 
    I need to copy all elements under one node..so I am using mass copy. And need to copy some elements from another node..can this be done within mapper itself?

    my input is like this :

    <Transmission transmissionVersion="XYZ" xmlns="">
    <TransmissionHeader>
    <TransmissionId>ABC11111111</TransmissionId>
    </TransmissionHeader>
    <ReturnDocument>
    <DocumentId>ABC123/DocumentId>
    <FilingHeader>
    ...
    <FilingType>RTN_AND_PMNT</FilingType>
    ...
    </FilingHeader>
    <Return>
    ...
    ...
    ...
    </Return>
    <FinTrans>
    ...
    ...
    </FinTrans>
    </ReturnDocument>
    <ReturnDocument>
    <DocumentId>XYZ123/DocumentId>
    <FilingHeader>
    ...
    <FilingType>PMNT_ONLY</FilingType>
    ...
    </FilingHeader>
    <FinTrans>
    ...
    ...
    </FinTrans>
    </ReturnDocument>
    <ReturnDocument>
    <DocumentId>PQR123/DocumentId>
    <FilingHeader>
    ...
    <FilingType>RTN_ONLY</FilingType>
    ...
    </FilingHeader>
    <Return>
    ...
    ...
    ...
    </Return>
    </ReturnDocument>

    </Transmission>


    Output should contain transmission info , all the elements under ReturnDocument and only <FilingType> from <FilingHeader>. I used masscopy for return. 
    But is there way to copy only couple of elements from FilingHeader. Also is there a way to copy one transmission info..which is at document level to all the records on output side.



    Sunday, January 10, 2016 5:38 AM

All replies

  • Hi Nishant,

    Thank you for posting in MSDN forum.

    >>But is there way to copy only couple of elements from FilingHeader.

    Could you please provide some more information, what you want to process from source to destination. and if possible please provide input message with expected out message. 

    >>Also is there a way to copy one transmission info..which is at document level to all the records on output side.

    Yes, You can map all source schema to single destination schema. Either use XSLT or mass copy functoid.


    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Sunday, January 10, 2016 6:48 AM
    Moderator