21,886
社区成员
发帖
与我相关
我的任务
分享
<?
header("Content-Type: text/html; charset=UTF-8");
$xml = <<< XML
<S001 username="wang" password="123"/>
XML;
$sxe = new SimpleXMLElement($xml);
echo $sxe->getName() . "\n";
?>
foreach($sxe->attributes() as $k=>$v){
echo $k." == ".$v."<br>";
}