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

Parse xml content-Attribute 2 of Reply node

WBOY
Release: 2016-07-28 08:29:40
Original
1000 people have browsed it

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>
Copy after login

PHP code implementation for parsing xml content:

Reply;		
$CmdResult = $ReplyArr['Result'];
$ErrorDescription = (string) $ReplyArr['Description'];
var_dump($CmdResult);
var_dump($ErrorDescription);
Copy after login

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template