I want to achieve the below output using xmldom
<ENVELOPE> <LEDGER NAME="Shah" Action="CREATE"> </LEDGER> </ENVELOPE>
for this how can i write 2nd line using xmldom?
<LEDGER>
<LEDGER NAME="Shah" Action="CREATE" />
Need To Set Attributes for it..
$ledger = $xml->createElement("LEDGER"); $ledger->setAttribute("NAME", "$resul"); $ledger->setAttribute("Action", "CREATE");
<LEDGER>tag is not closed. I think you want<LEDGER NAME="Shah" Action="CREATE" />. - Anders Lindahl