【发布时间】:2013-04-29 11:21:22
【问题描述】:
当调用 php 页面时,我使用以下代码获取 XML 文件:
即当您输入http://example.com/strtoxmp.php 时,它将根据以下编码返回xml:
$xml = new SimpleXMLElement("<feed/>");
$feed = $xml;
$feed->addChild('resultLength', "1");
$feed->addChild('endIndex', "1");
$item = $feed->addChild('item',"");
$item->addChild('contentId', "10031");
$item->addChild('contentType', "Talk");
$item->addChild('synopsis', "$newTitle" );
$item->addChild('runtime', ' ');
}
Header('Content-type: text/xml; charset:UTF-8; ');
print($xml->asXML());
它工作正常。它产生以下xml:
<?xml version="1.0"?>
<feed>
<resultLength>1</resultLength>
<endIndex>1</endIndex>
<contentId>10031</contentId>
<contentType>Talk</contentType>
<synopsis>Mark Harris - Find Your Wings</synopsis>
<runtime> </runtime>
</item>
</feed>
但我需要
而不是
【问题讨论】:
-
谁说你需要那个?两者应该是等价的。
-
ROKU 不适用于 但它适用于
-
什么是ROKU?流媒体播放器?