xml document content:
<?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>
PHP code implementation for parsing xml content:
Reply; $CmdResult = $ReplyArr['Result']; $ErrorDescription = (string) $ReplyArr['Description']; var_dump($CmdResult); var_dump($ErrorDescription);
The above has introduced the attribute 2 of the Reply node in parsing xml content, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.