Helping Hand..
Helping Hand..

Reputation: 2440

syntax error while writing sentence using xmldom

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

Answers (1)

Helping Hand..
Helping Hand..

Reputation: 2440

Need To Set Attributes for it..

$ledger = $xml->createElement("LEDGER");
$ledger->setAttribute("NAME", "$resul");
$ledger->setAttribute("Action", "CREATE");

Upvotes: 3

Related Questions