Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 xmldom 实现以下输出
<ENVELOPE> <LEDGER NAME="Shah" Action="CREATE"> </LEDGER> </ENVELOPE>
为此,我如何使用 xmldom 编写第二行?
需要为它设置属性..
$ledger = $xml->createElement("LEDGER"); $ledger->setAttribute("NAME", "$resul"); $ledger->setAttribute("Action", "CREATE");