How to access the content of simple type XML element via XSLT/XPath after transforming it to JSON and back to XML?
<p>I have a XML string</p>

<pre><code>&lt;Frequency unit="Hz"&gt;200&lt;/Frequency&gt;
</code></pre>

<p>which is transformed to this JSON string</p>

<pre><code>{"Frequency":{"unit":"Hz","content":200}}
</code></pre>

<p>by using this code:</p>

<pre><code>final String originalXml = "&lt;Frequency unit=\"Hz\"&gt;200&lt;/Frequency&gt;";
final String jsonString = XML.toJSONObject( originalXml ).toString();
</code></pre>

<p>Once I transform it back with this code</p>

<pre><code>final String xml = XML.toString( new JSONObject( jsonString ) );
</code></pre>

<p>I get the resulting xml like this:</p>

<pre><code>&lt;Frequency&gt;
   &lt;unit&gt;Hz&lt;/unit&gt;
   200
&lt;/Frequency&gt;
</code></pre>

<p>The question now is:
How can I access the value '200' via XPath using a XSLT transformation? The goal is, to get "200 Hz" out of the XML.</p>

<p>Currently I'm achieving this as follows: I'm getting the whole content which returns "Hz200". Then I'm getting the content of "unit" and do a substring-after, which is quiet ugly:</p>

<pre><code>&lt;xsl:variable name="frequencyUnit" select="/Frequency/unit"/&gt;
&lt;xsl:value-of select="concat(substring-after(/Frequency, $frequencyUnit),' ',$frequencyUnit )"/&gt;
</code></pre>

<p>With that I get the expected result "200 Hz".</p>

<p>I would appreciate any recommendations.
Thanks in advance!</p>