<?php
$xmlStr = "";
$xmlStr .= "<sms>";
$xmlStr .= "<phone>123456789</phone>";
$xmlStr .= "<content>你好</content>";
$xmlStr .= "</sms>";
$xmlStr .= "<sms>";
$xmlStr .= "<phone>987654321</phone>";
$xmlStr .= "<content>你好2</content>";
$xmlStr .= "</sms>";
// 就这个问题,读出phone 和 content
?>
缺少了根节点
我自己解决了。