xml文件內容:
<?xml version="1.0" encoding="UTF-8"?> <ADI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Objects></Objects> <Mappings></Mappings> <Reply> <Result>0</Result> <Description>All action successfully.</Description> </Reply> </ADI>
解析xml內容的php程式碼實作:
Reply; $CmdResult = $ReplyArr['Result']; $ErrorDescription = (string) $ReplyArr['Description']; var_dump($CmdResult); var_dump($ErrorDescription);