title: How to save multidimensional array with attributes to xml file
body: <p>This multidimensional array with attributes:</p>
  
  <pre><code>Array
  (
      [EPaperPage] =&gt; Array
          (
              [@attributes] =&gt; Array
                  (
                      [ePdfPageSize] =&gt; 1
                      [eJpegPageSize] =&gt; 0
                  )
  
              [EDayOfPub] =&gt; Array
                  (
                      [@attributes] =&gt; Array
                          (
                              [dtmCreatedDate] =&gt; 2016-02-02T14:40:01
                              [dtmLastUpdate] =&gt; 2016-02-02T14:40:01
                              [strCreatorLoginName] =&gt; sdsdt
                              [strLastUpdaterLoginName] =&gt; sdsdst
                              [nContentVersion] =&gt; 3
                          )
  
                      [OrigId] =&gt; Array
                          (
                              [@attributes] =&gt; Array
                                  (
                                      [kLocationId] =&gt; 960
                                      [strPubCustId] =&gt; OND
                                      [eLogType] =&gt; 20
                                      [strDocId] =&gt; fd34c3c5-053b-45e7-bd92-66f04db013aa
                                      [nVersion] =&gt; 0
                                  )
  
                          )
  [...]
  </code></pre>
  
  <p>must be save in file like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;DialogEPaperPage&gt;
          &lt;EPaperPage ePdfPageSize="1" eJpegPageSize="0"&gt;
              &lt;EDayOfPub dtmCreatedDate="2016-02-02T14:40:01" dtmLastUpdate="2016-02-02T14:40:01" strCreatorLoginName="sdfsdf" [...]
  </code></pre>