title: Format XML data
body: <p>I'm using this code to format XML data into shell:</p>
  
  <pre><code>def modify_trx_id(request_body)
      doc = Nokogiri::XML(request_body)
      puts "XML content:"
      doc.to_xml
    end
  </code></pre>
  
  <p>But the output is not very  structured:</p>
  
  <pre><code>"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;payment_transaction&gt;\n   &lt;transaction_type&gt;sale&lt;/transaction_type&gt;\n
  </code></pre>
  
  <p>How I can structure it into properly formatted XML output?</p>