Heim >Backend-Entwicklung >PHP-Tutorial >解析xml内容-Reply节点的属性2

解析xml内容-Reply节点的属性2

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-28 08:29:401026Durchsuche

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);

以上就介绍了 解析xml内容-Reply节点的属性2,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn