title: WSO2 enrich mediator - enrich a non-valid xml
body: <p>I have an issue. Let's say I have an xml like this:</p>
  <pre><code>&lt;message&gt;
     &lt;a&gt;a_content&lt;/a&gt;
     &lt;b&gt;b_content&lt;/b&gt;
     &lt;c&gt;c_content&lt;/c&gt;
   &lt;/message&gt;
  </code></pre>
  <p>I need to parse them and then execute an external script with these variables as arguments for script.</p>
  <p>A can hardcode it via</p>
  <pre><code>&lt;property expression=&quot;$body//a&quot; name=&quot;a&quot; xmlns:m0=&quot;http://services.samples&quot;/ scope=&quot;default&quot; type=&quot;STRING&quot;&gt;
  </code></pre>
  <p>but I don't know exactly, how these a,b and c called. Beside this, it will be more handy to parse them dynamically in sort of array.</p>
  <p>So, I parsed all the message with this:</p>
  <pre><code>&lt;property expression=&quot;$body//message//*&quot; name=&quot;message&quot; xmlns:m0=&quot;http://services.samples&quot;/ scope=&quot;default&quot; type=&quot;STRING&quot;&gt;
  </code></pre>
  <p>but after this property &quot;message&quot;
  looks like this:</p>
  <pre><code>   &lt;a&gt;a_content&lt;/a&gt;
     &lt;b&gt;b_content&lt;/b&gt;
     &lt;c&gt;c_content&lt;/c&gt;
  </code></pre>
  <p>and so I cannot use xml parser, because this xml becomes non-valid.</p>
  <p>How can I dynamically parse these parameters into one array, and names of these parameters to another array?</p>
  <p>I want end result to be like this:</p>
  <pre><code>array_1 = ['a_content', 'b_content', 'c_content']
  array_2 = ['a', 'b', 'c']
  </code></pre>