title: how to convert XML to JSON in java?
body: <p>How to convert XML to JSON in java servlet.</p>
  
  <pre><code>    &lt;?xml&gt;&lt;SOAP-ENV:Envelope xmlns:xsd= "http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:HNS="http://tempuri.org/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;SOAP-ENV:Header&gt;&lt;HNS:ROClientID SOAP-ENV:mustUnderstand="0"&gt;{6C9A8E69-2018-4090-8FA7-DEB98300E102}&lt;/HNS:ROClientID&gt;&lt;/SOAP-ENV:Header&gt;&lt;SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ro="http://tempuri.org/"&gt;&lt;NS1:GetStationListResponse xmlns:NS1="urn:WOOSServices-WOrbitService"&gt;&lt;Stations xsi:type="xsd:string"&gt;&lt;/Stations&gt;&lt;Result xsi:type="xsd:string"&gt;{
      "MOColmns": [
          {
              "MOTitle": "Description"
          },
          {
              "MOTitle": "station_name"
          },
          {
              "MOTitle": "StationID"
          },
          {
              "MOTitle": "StationINT"
          }
      ]
  }&lt;/Result&gt;&lt;/NS1:GetStationListResponse&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;";
              String xml = "&lt;xx yy='nn'&gt;&lt;mm&gt;zzz&lt;/mm&gt;&lt;/xx&gt;";
  
              JSONArray json = (JSONArray) XMLSerializer.read(xml);  
              System.out.println( json ); 
  </code></pre>
  
  <p>please help me.</p>