我无法找出显示
的错误'此页面包含以下错误: 第1行第2列的错误:StartTag:无效的元素名称 下面是直到第一个错误的页面呈现。'
init.php
<?php
$servername = "localhost";
$username = "root";
$password = null;
$databaseName = "test";
$db = mysqli_connect($servername, $username,
$password, $databaseName)
?>
viewWishList.php
<?php
header ("Content-Type:text/xml");
include ("config/init.php");
$query = "SELECT * FROM members";
$result = mysqli_query($connection, $query) or
die ("Error in query: $query. ".mysql_error());
$_xml = '<?xml version="1.0"?>'
$_xml .="<wishList>";
while($row = mysqli_fetch_array($result)) {
$_xml .="<wishlist>";
$_xml .="<wishlistID>".$row['wishlistID']."
</wishlistID>";
$_xml .="<bookName>".$row['bookName']."
</bookName>";
$_xml .="<bookType>".$row['bookType']."
</bookType>";
$_xml .="</wishlist>";
}
$_xml .="</wishList>";
$xmlobj=new SimpleXMLElement($_xml);
print $xmlobj->asXML();
$xmlobj->asXML(wishlist.xml);
?>