Php 使用DomDocument对象MIDI xml文件?
使用DomDocument对象MIDI xml文件 有一个file.xml文件Php 使用DomDocument对象MIDI xml文件?,php,Php,使用DomDocument对象MIDI xml文件 有一个file.xml文件 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <Document xmlns="urn:iso:std"> <content> <GrpHdr> <MsgId>xxxxxx </MsgId> <CreDtTm>2010-07-05T16:48:00&l
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Document xmlns="urn:iso:std">
<content>
<GrpHdr>
<MsgId>xxxxxx </MsgId>
<CreDtTm>2010-07-05T16:48:00</CreDtTm>
<BtchBookg>false</BtchBookg>
<NbOfTxs>2</NbOfTxs>
<CtrlSum>56653</CtrlSum>
<Grpg>Old</Grpg>
<InitgPty>
<Nm> Name </Nm>
</InitgPty>
</GrpHdr>
</content>
<Document>
xxxxxx
2010-07-05T16:48:00
假的
2.
56653
古老的
名称
如何修改xml数据并保存回file.xml(例如)
1
1223
新的
使用DomDocument对象的save()函数,例如:
$dom->save(“newfile.xml”)
查看更多详细信息可能重复的
<NbOfTxs>1</NbOfTxs>
<CtrlSum>1223</CtrlSum>
<Grpg>NEW</Grpg>