DOMToDoc() function

Move a part of XML from Process Data to Primary Document
Mirjana's picture

DOMToDoc function - take a specific node from Process Data


Take UM element from Process Data and put it into PrimaryDocument with DOMToDoc() function.
Process Data
<?xml version="1.0" encoding="UTF-8"?>
          <PrimaryDocument SCIObjectID="MIRJANA:node1:1316a763640:145462"/>
Primary Document after the operation should be:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1. DOMToDoc function
DOMToDoc function setting

<assign to="." from="DOMToDoc(//*[name() = 'UM'], 'PrimaryDocument', 'no', 'UM')"></assign>

 … or even more simple …

 <assign to="." from="DOMToDoc(//UM,'PrimaryDocument','no', 'UM')"></assign>

2. XML Encoder
<operation name="XML Encoder">
          <participant name="XMLEncoder"/>
          <output message="XMLEncoderTypeInputMessage">
                   <assign to="." from="*"/>
                   <assign to="mode">process_data_to_document</assign>
                   <assign to="root_element">UM</assign>
                   <assign to="xPath">//UM/*</assign>
          <input message="inmsg">
                   <assign to="." from="*"/>


Syndicate content