Home >Backend Development >PHP Tutorial >Parse xml content-Attribute 2 of Reply node

Parse xml content-Attribute 2 of Reply node

WBOY
WBOYOriginal
2016-07-28 08:29:40993browse

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn