copy anyting from xml node as string in groovy

 copy anything from input string ( xml string , inside note );

ref link: Remove XML Declarations and Unwanted Message nodes from XML using groovy script in CPI | SAP Blogs




<root>
                   <Parent>
                      <Child1>Value1</Child1>
                      <Child2>Value2</Child2>
                      <Child3>Value3</Child3>
                      <Child4>
                          <field1>Value4</field1>
                          <field2>Value5</field2>
                      </Child4>
                   </Parent>
                </root>



<root>
                   <Parent>
                      <Child1>Value1</Child1>
                      <Child2>Value2</Child2>
                      <Child3>Value3</Child3>
                      <Child4>
                          <field1>Value4</field1>
                          <field2>Value5</field2>
                      </Child4>
                   </Parent>
                </root>


<?xml version='1.0' encoding='UTF-8'?>
    <multimap:Messages xmlns:multimap="http://sap.com/xi/XI/SplitAndMerge">
       <multimap:Message1>
         <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
             <ns0:Message1>
                <root>
                   <Parent>
                      <Child1>Value1</Child1>
                      <Child2>Value2</Child2>
                      <Child3>Value3</Child3>
                      <Child4>
                          <field1>Value4</field1>
                          <field2>Value5</field2>
                      </Child4>
                   </Parent>
                </root>
              </ns0:Message1>
           </ns0:Messages
        ></multimap:Message1>
    </multimap:Messages>

Popular posts from this blog

pss book : శ్రీకృష్ణుడు దేవుడా, భగవంతుడా completed , second review needed. 26th April 2024

pss book: గురు ప్రార్థనామంజరి . completed 21st july 2024

pss book: కధల జ్ఞానము read review pending. 25th june 2024