Possible Duplicate:
PHP: Create new XML file and write data to it?
PHP DOM method createElement need to be self-closing tag
i am trying to create a XML file with php, but i don`t know a commmand which creates the following:
<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2">
<graph mode="static" defaultedgetype="directed">
<nodes>
<node id="0" label="Hello" /> //I mena this Object
<node id="1" label="Word" />
</nodes>
<edges>
<edge id="0" source="0" target="1" />
</edges>
</graph>
</gexf>
I'm talking about this child that doesn't consist of one opening statement and a close statement but just a single statement. Now I'm looking for a command that can create this kind of child (<node/>
)