Home Forums Programming XML LOADING COMPLEX XML FILE RE: LOADING COMPLEX XML FILE

  • Thanks. The storing in variable works fine but now that I have a better understanding of the process, I am getting confused with the file response you wrote me and how to get the xml file that I need from the one that I have.

    <d1p1:Worker>

    <d1p1:Worker_Reference d1p1:Descriptor="Olga Akinyo">

    <d1p1:ID d1p1:type="WID">af432f03c87f435f9ecb77460202f438</d1p1:ID>

    <d1p1:ID d1p1:type="Contingent_Worker_ID">69816</d1p1:ID>

    </d1p1:Worker_Reference>

    </d1p1:Worker>

    I want to Extract Full Name which is Ola

    and

    EmployeeID which is 69816.

    I am having problem matching the first one you sent me to the original text above

    Could you please, write me a mapping using the above to get the xml file below:

    <?xml version="1.0"?>

    <Worker>

    <Worker_Reference>Employee Name</Worker_Reference>

    <Employee_ID>62005</Employee_ID>

    </Worker>

    The first one you sent me is copied below:

    <Workers>

    {

    for $x in //d1p1:Worker

    return

    <Worker>

    <EmployeeID>{$x/d1p1:Worker_Reference/d1p1:ID[@d1p1:type="Employee_ID"]/text()}</EmployeeID>

    <FullName>?? unknown ??</FullName>

    </Worker>

    }

    </Workers>

    ')