You can create a mapping statement by dragging a node from the input schema to a node in the output schema. The XMap editor adds the mapping statement to the mapping statement grid.
To open the XMap editor, in the
Overview
view, click the
Patient_Claim
XMap link.
The XMap editor appears and shows the input and output schemas. In the following image, the XMap editor displays the input schema on the left, and the output schema on the right:
Drag the mouse from the
Doctor
input schema node to the
Claims
output schema node.
The following image shows how the XMap links the XML input to the XML output:
Both schema nodes are repeating nodes, so the XMap editor creates a Repeating Group statement named
Doctor to Claims
in the grid. Statements under the Repeating Group statement are iterated for each instance of input data.
Drag the mouse from the
Specialty
input node under the
Doctor
input node to the
Specialization
output schema node.
There is a
Specialty
input node under the
Doctor
input node, and a
Speciality
input node under the
Patient
input node. We refer to the first node in this lesson.
After you complete this step, the XMap editor creates a Map statement named
Specialty to Claims/@Specialization
in the grid. This statement passes the name of the medical field of specialization to the output XML.
Drag the mouse from the
Name
input schema node to the
Name
output schema node.
The XMap editor creates a Map statement named
Name to Name
in the grid.
This statement passes the name of the doctor to the output XML.
Drag the mouse from the
Email
input schema node to the
Email
output schema node.
The XMap editor creates a Map statement named
Email to Email
in the grid. This statement passes the customer phone number to the output XML.
The following image shows how the XMap links the XML input elements to the XML output in Map statements: