--- title: "Create XML Output (Patterns and Rearranges) - Lasernet Training" slug: "create-xml-output-patterns-and-rearranges" description: "In this exercise, you are proposed to create a structure of the output in the XML format by adding patterns, rearranges, and other elements." tags: ["Form Editor", "Lasernet 9 ", "Patterns", "Rearranges ", "XML"] updated: 2026-03-06T07:36:28Z published: 2026-03-06T07:36:28Z canonical: "kb.lasernetgroup.com/create-xml-output-patterns-and-rearranges" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Create XML Output (Patterns and Rearranges) **Applies to:** Lasernet 9 In this exercise, you are proposed to create a structure of the output in the XML format by adding patterns and rearranges, adding a regional profile and applying it to objects to change the regional settings for numbers and dates, as well as activating node values for which a rearrange is not presented. > [!NOTE] > Note > > This article describes a software version that is no longer supported. Although the software will no longer receive updates or technical support, existing documentation, such as this article, will be retained for reference purposes but will no longer be updated. If you have any questions, contact [Lasernet Support](https://support.lasernetgroup.com/new-ticket). ## Exercise Download and import the attached configuration called **06. Create XML Output (Patterns and Rearranges) in Lasernet Developer 9**. Afterward, navigate to the **Forms** section and open the **Sample** form. 1. Start by adding rearranges to the input. To this end, in the input, add a rearrange to the **InvoiceId** node. On the Developer toolbar, click **Rearrange**. 2. When a pointer becomes a cross, click the **InvoiceId** node. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472020884.png) Once a rearrange is added to the input, you shall add it to the required node in the output. You have two options: 1. Right-click the rearrange in the input and then click **XML** in the context menu that appears. The **Edit XML** **Rearrange** dialog will open on the **XML** tab. 2. Select the **cbc:ID** checkbox, which denotes the name of the node in the output to which you add the rearrange. Once you are done, click **Ok**. 3. As a result, the rearrange is added to the **cbc:ID** node in the output. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472024024.png) Otherwise, you can drag a rearrange from the input to the required node in the output. 1. Use the steps described above to add a rearrange to the **InvoiceDate** node in the input, and then add the rearrange to the **cbc:IssueDate** node in the output. 2. The **cbc:IssueDate** node contains a date value for which you are to specify an appropriate format and a regional profile. You can do it later. In the meantime, you are proposed to mark the node as incomplete. To this end, right-click the node and then click **Not complete** in the context menu that appears. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472021771.png) 1. Add two rearranges to the **InvoicingName** node in the input. When more than one rearrange is added to a node, its record becomes grey-highlighted. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472022747.png) 1. First, drag the rearrange to the **cbc:Name** node available under the **cac:AccountingSupplierParty** node in the output. Afterward, hold down **SHIFT** and click the **InvoicingName** node in the input once again, but now drag it to the **cbc:Name** node available under the **cac:AccountingCustomerParty** node in the output. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472022256.png) To switch between rearranges in the output, in the input, click the node to which both rearranges of the output belongs and then click the node holding down **SHIFT**. As a result, you can see a focus (a black rectangle) moves from one rearrange in the output to another. Afterward, follow steps 8-9 to add rearranges to the nodes both in input and output, as shown in the following image: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472022010.png) 1. In the input, add a rearrange to the **Salesbalance** node and drag it to the **cbc:PayableAmount** node in the output. Afterward, mark the **cbc:PayableAmount** node as **Not complete**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472020316.png) You are now proposed to add a JobInfo to the input. To this end, follow these steps: 1. On the Developer toolbar, click **JobInfo**. 2. When a pointer becomes a cross, click the **CurrencyCode** node. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472020588.png) Proceed to add a JobInfo value to the **CurrencyCode** node attribute in the output. To this end, follow these steps: 1. On the Developer toolbar, click **Text**. 2. When a pointer becomes a cross, click the **CurrencyCode** node attribute in the output. As a result, **New Insert Text** is added. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472022514.png) 1. Double-click **New Insert Text**. The **Edit XML Rearrange** dialog box opens with the **Objects** tab. 2. From the **Object type** drop-down combo box, select **JobInfo**. Afterwards, type **CurrencyCode** in the text box below. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472021583.png) To view the **CurrencyCode** node attribute value, press **SHIFT+F5.** Otherwise, on the **View** menu, click **Run JavaScript**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472023000.png) Proceed to add a pattern to the **Body_CustInvoiceTrans** node in the output. To this end, follow these steps: 1. On the Developer toolbar, click **Pattern**. 2. When a pointer becomes a cross, click the **Body_CustInvoiceTrans** node in the input, and then click **Ok** in the **Pattern Properties** dialog that appears. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472024500.png) 1. Add the pattern to the **cac:InvoiceLine** node in the output by dragging it from the input. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472024285.png) As a result, a multi-lined pattern is added to the output, and the **cac:InvoiceLine** node is shown as many times in the output as many lines belong to the pattern in the input. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472024708.png) 1. Proceed to add rearranges to the pattern in the input, as shown in the following image. 2. Once you are done, use any of the available ways to add rearranges to the output: | Input | Output | | --- | --- | | Name | cbc:Name | | Qty | cbc:InvoicedQuantity | | SalesUnitTxt | cbc:InvoicedQuantity (the unitCode attribute) | | SalesPrice | cbc:PriceAmount | | LineAmount | cbc:LineExtensionAmount | ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472025139.png) 1. Mark nodes containing number values as incomplete by right-clicking each node and then clicking **Not complete** in the context menu that appears. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472024909.png) > [!NOTE] > Info > > Status flags are a reminder tool only, to define the status of your work, and will have no effect on the final parsing. 1. Follow steps 13-16 to add a JobInfo value as a **currencyID** attribute to the **cbc:PriceAmount** and **cbc:LineExtensionAmount** nodes in the output. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472025313.png) As a result, a JobInfo is added as a **currencyID** attribute to the **cbc:PriceAmount** and **cbc:LineExtensionAmount** nodes. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472025753.png) You are now proposed to add a script to the **cbc:ID** node in the output. To this end, follow the steps listed below. 1. On the Developer toolbar, click **Text**. 2. When a pointer becomes a cross, click the **cbc:ID** node in the output. As a result, **New Insert Text** is added. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472025558.png) 1. Double-click **New Insert Text**. As a result, the **Edit XML Rearrange** dialog box opens with the **Objects** tab. 2. From the **Object type** drop-down combo box, select **Script**. 3. To add a line counter, type **Line + 1**; in the text box to the right. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472026004.png) To view the **cbc:ID** node value, press **SHIFT+F5**. Otherwise, on the **View** menu, click **Run JavaScript**. It is time now to come back to the nodes containing date and number values and specify an appropriate format and a regional profile for them. 1. First, go to the **cbc:IssueDate** node in the output and double-click its value. 2. In the **Edit XML Rearrange** dialog box that appears, switch to the **Formats** tab. 3. From the **Format category** drop-down combo box, select **Date**. 4. On the **Input format** tab, select the **Override form input format** checkbox, and then click the **Add** button. 5. In the **Edit Regional Profile Mapping** dialog box that appears, select **dd-MM-yyyy** from the **Regional profile** drop-down combo box. Once you are done, click **Ok** on both dialog boxes. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472026193.png) Proceed to the nodes containing number values and specify an appropriate format and a regional profile for them. 1. Navigate to the **cbc:PayableAmount** node in the output and double-click its value. 2. In the **Edit XML Rearrange** dialog box that appears, switch to the **Formats** tab. 3. From the **Format category** drop-down combo box, select **Number**. 4. On the **Output format** tab, select the **Override sheet output format** checkbox, and then click the **Add** button. 5. In the **Edit Regional Profile Mapping** dialog box that appears, select **XML Format** from the **Regional profile** drop-down combo box. Once you are done, click **Ok** on both dialog boxes. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472026405.png) Perform steps 34-38 for those nodes that have number values and the **CurrencyCode** attribute. For the **cbc:InvoicedQuantity** node, follow the same steps, but on step 37, additionally type **0** in the **Number of decimals** text box. 1. Once you are done specifying formats for the node values, you can remove the **Not complete** flag for those nodes. To this end, scroll up the output to the top, right-click the **Invoice** node, and then click **Clear all flags**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472026619.png) In the following step, you are proposed to modify the rest of the nodes for which no rearranges are added in such a way that they can take their default values. To this end, follow the steps listed below. 1. Go to the **xmlns:ccts** attribute of the **Invoice** node and right-click its value. 2. In the context menu that appears, click **Properties**. 3. In the **Node Template Properties** dialog box, select the **Use default value if no rearrange is provided** check box. Once you are done, click the **Ok** button. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472026795.png) Here is the final view of your document after all the proposed alterations. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1627472027018.png) ## Attachments - [06.-Create-XML-Output-Patterns-and-Rearranges.lnconfigx](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/06.-Create-XML-Output-Patterns-and-Rearranges.lnconfigx)