iPhone NSXMLParse for .asx 文件
我对 XML 完全陌生。
有谁有示例代码来帮助我构建一个自定义类,该类可以解析 Microsoft .asx 文件以在 iPhone 上按顺序播放彩信流?
一些谷歌搜索告诉我,.xml 和 .asx 有一定的相关性,尽管与第一个相比,第二个非常有限。
我需要在 .asx 容器内按顺序播放三个流,如下所示:
<asx version="3.0">
<TITLE>MYSONGS</TITLE>
<entry>
<TITLE>www.mysite.com</TITLE>
<ref href="mms://mysite.com/musicFolder/song1.wma" />
</entry>
<entry>
<TITLE>MYSONGS</TITLE>
<ref href="mms://mysite.com/musicFolder/song2.wma" />
</entry>
<entry>
<TITLE>www.mysite.com</TITLE>
<ref href="mms://mysite.com/musicFolder/song3.wma" />
</entry>
</asx>
我已经能够解析 mms 流、解码并播放 wma 文件。我只是还无法解析 .asx 内容,以按顺序播放流。谢谢!
I'm totally new to XML.
Does anyone have a sample code to help me build a custom class that would parse Microsoft .asx files to play mms streams in sequence on the iPhone?
Some Googling revealed to me that .xml and .asx are somewhat related, though the second one is very limited if compared to the first.
I need to play three streams in sequence, inside an .asx container like this:
<asx version="3.0">
<TITLE>MYSONGS</TITLE>
<entry>
<TITLE>www.mysite.com</TITLE>
<ref href="mms://mysite.com/musicFolder/song1.wma" />
</entry>
<entry>
<TITLE>MYSONGS</TITLE>
<ref href="mms://mysite.com/musicFolder/song2.wma" />
</entry>
<entry>
<TITLE>www.mysite.com</TITLE>
<ref href="mms://mysite.com/musicFolder/song3.wma" />
</entry>
</asx>
I'm already able to parse the mms stream, decode and play the wma file. I'm just not able yet to parse .asx content, to play the streams in sequence. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就我而言,我已经能够使用 TouchXML 成功解析 .asx 文件,使用此代码(我从
http://foobarpig.com/iphone/ 上提供的原始版本修改了该代码)解析-xml-element-attributes-with-touchxml.html):
In my case I've been able to successfully parse .asx files using TouchXML, using this code (that I modified from the original version available at
http://foobarpig.com/iphone/parsing-xml-element-attributes-with-touchxml.html):