Reputation: 2440
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?
Upvotes: 2
Views: 69
Reputation: 2440
Need To Set Attributes for it..
$ledger = $xml->createElement("LEDGER");
$ledger->setAttribute("NAME", "$resul");
$ledger->setAttribute("Action", "CREATE");
Upvotes: 3