翻译php id';s转换为xml以帮助客户端使用itunes
我认为这将是相当容易的,但我找不到任何有这个 我想要一个php页面,我的客户可以编辑并转换成iTunesXML文件。我想我的页面不需要是php,如果这会妨碍翻译的话 有办法做到这一点吗 这是代码。还有很多,但是你得到了jist翻译php id';s转换为xml以帮助客户端使用itunes,php,xml,itunes,Php,Xml,Itunes,我认为这将是相当容易的,但我找不到任何有这个 我想要一个php页面,我的客户可以编辑并转换成iTunesXML文件。我想我的页面不需要是php,如果这会妨碍翻译的话 有办法做到这一点吗 这是代码。还有很多,但是你得到了jist <div id="iTunes"> <p id="title" class="cms-editable">Your Channel tile</p> <p id="author" class="cms-editable">A
<div id="iTunes">
<p id="title" class="cms-editable">Your Channel tile</p>
<p id="author" class="cms-editable">Authors Name</p>
<p id="summary" class="cms-editable">Short Summary</p>
<p id="description" class="cms-editable">Short Description</p>
<div id="item" class="cms-repeatable" >
<p id="item-title" class="cms-editable">Your Podcast Title</p>
<p id="item-author" class="cms-editable">Podcast Author</p>
<p id="item-enclosure" class="cms-editable">http://www.Domain.org/podcast.mp3</p>
</div>
</div>
您的频道互动程序
作者姓名
简短摘要
简短描述
您的播客标题
播客作者
http://www.Domain.org/podcast.mp3
XML应该是这样的
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<title>Your Channel tile</title>
<itunes:author>Authors Name</itunes:author>
<itunes:summary>Short Summary</itunes:summary>
<description>Short Description</description>
<item>
<title>Your Podcast Title</title>
<itunes:author>Podcast Author</itunes:author>
<enclosure url="http://www.Domain.org/podcast.mp3" length="" type="audio/x-mp3" />
</item>
</channel>
</rss>
您的频道互动程序
作者姓名
小结
简短描述
你的播客标题
播客作者
谢谢你抽出时间 您可以使用jquery生成xml 例如,您可以像这样生成xml
var xml = $('<?xml version="1.0"?><foo><bar></bar><bar></bar></foo>'); // Your xml
var xmlCont = $('<xml>'); // You create a XML container
xmlCont.append(xml); // You append your XML to the Container created in the main document
// Now you can append without problems to you xml
xmlCont.find('foo bar:first').append('<div />');
xmlCont.find('foo bar div'); // Test so you can see it works
这也是一个示例,请参考这里的xml创建
要从父节点获取所有子节点,请使用此引用
我希望这将帮助您完成项目您可以提供XML模式吗?或者你是在问iTunes是否有这样一个问题吗?我只是用XML编辑了这个问题。我会说将它加载到
DOMDocument
中,然后使用XSLTProcessor::transformToXML
,xsl似乎并不难。
$("#item > p").each(function() {
//Create xml here
});