How to create XML structure with PHP DOMDocummnet

1

I have the following structure of an XML. How would the creation of such XML using PHP be? I have reviewed documentation of DOMDocument , but I am somewhat lost with the creation of Namespaces and its attributes, I would appreciate some guidance.

Here is the structure:

<prefix:Documment xmlns:prefix="http://example.com" 'xmlns:xs="http://example.com" xmlns:xsi="http://example.com" xsi:schemaLocation="http://example.com http://example.com" Version="3.3"/>'
<prefix:data1 value1="123" value2="123"/>
<prefix:data2 value1="123" value2="123"/>
 <prefix:Concepts>
     <prefix:Concept value1="123" value2="123"/>
      <prefix:other>
        <prefix:other2>
           <prefix:other2 value1="123" value2="123"/>                   
        </prefix:other2>                              
      </prefix:other>
     </prefix:Concept>
 <prefix:Concepts>
</prefix:Documment>
    
asked by Jhon 14.01.2018 в 04:56
source

0 answers