title: Convert JSON FILE to XML FILE using POWERSHELL
body: <p>I need to convert Json file from web to xml file and i need very simple way... There are several data I need from Json response...
  There are a lot of around but they are not very clear.
  I found some samples like this:</p>
  <pre><code>PS c:\0&gt; ConvertTo-Xml -InputObject temp_JSON.json -As String   
  
  PS c:\0&gt; ConvertTo-Xml -InputObject temp_JSON.json -As document
  </code></pre>
  <p>but I can't see or find result... Where I'm wrong.</p>
  <p>this is Json response string to convert :</p>
  <pre><code>&quot;{&quot;data&quot;:[{&quot;id&quot;:&quot;86xEyb****lUsw==&quot;,&quot;custom_fields&quot;:{&quot;firstName&quot;:&quot;Z***n&quot;,&quot;lastName&quot;:&quot;Pe***ki&quot;,&quot;locale&quot;:&quot;EN-GB_MK&quot;,&quot;timezone&quot;:&quot;8&quot;,&quot;gender&quot;:&quot;N\/A&quot;,&quot;phone&quot;:&quot;+38***6&quot;,&quot;email&quot;:null},&quot;tags&quot;:[],&quot;created_at&quot;:1600276472}],&quot;links&quot;:{&quot;first&quot;:&quot;http:\/\/app.respond.io\/api\/v1\/contact\/by_custom_field?name=firstName&amp;value=zoran&amp;page=1&quot;,&quot;last&quot;:&quot;http:\/\/app.respond.io\/api\/v1\/contact\/by_custom_field?name=firstName&amp;value=zoran&amp;page=1&quot;,&quot;prev&quot;:null,&quot;next&quot;:null},&quot;meta&quot;:{&quot;current_page&quot;:1,&quot;from&quot;:1,&quot;last_page&quot;:1,&quot;path&quot;:&quot;http:\/\/app.respond.io\/api\/v1\/contact\/by_custom_field&quot;,&quot;per_page&quot;:10,&quot;to&quot;:1,&quot;total&quot;:1}}&quot;
  </code></pre>
  <p>@Guenther Schmitz answer works perfect,
  But I need some more to ask about style of xml. I receive output like</p>
  <pre><code>&lt;Objects&gt;
     &lt;Object Type=&quot;System.Management.Automation.PSCustomObject&quot;&gt;
        &lt;Property Name=&quot;data&quot; Type=&quot;System.Object[]&quot;&gt;
           &lt;Property Type=&quot;System.Management.Automation.PSCustomObject&quot;&gt;
              &lt;Property Name=&quot;id&quot; Type=&quot;System.String&quot;&gt;*******&lt;/Property&gt;
           &lt;Property Name=&quot;custom_fields&quot;  Type=&quot;System.Management.Automation.PSCustomObject&quot;&gt;
               &lt;Property Name=&quot;firstName&quot; Type=&quot;System.String&quot;&gt;B***&lt;/Property&gt;
               &lt;Property Name=&quot;lastName&quot; Type=&quot;System.String&quot;&gt;B***&lt;/Property&gt; ... 
  </code></pre>
  <p>But I tried conversion at Json to xml web converters and I got another xml format, which is more convenient to me, I need to import data to database and I need simple xml format, so I need that way like  :</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
  &lt;root&gt;
    &lt;data&gt;
      &lt;id&gt;nh****93UhUrQ==&lt;/id&gt;
      &lt;custom_fields&gt;
        &lt;firstName&gt;BI**NA&lt;/firstName&gt;
        &lt;lastName&gt;B**AK&lt;/lastName&gt;
        &lt;locale&gt;EN_MK&lt;/locale&gt; ...
  </code></pre>
  <p>Is it possible to get another xml output style.</p>
  <p>In mean time time I founded that if you add this parameter :</p>
  <pre><code>-notypeinformation
  </code></pre>
  <pre><code>it will clear up types from xml, so the line would be:
  $XML = ConvertTo-Xml -As Stream -InputObject $JsonObject -Depth 3 -notypeinformation
  </code></pre>
  <p>But still remain: &lt;Property Name=&quot;firstName&quot; ... instead name</p>