【发布时间】:2011-07-19 09:55:46
【问题描述】:
我有脏的 .out 文件,我正在将其转换为 xml。 我正在使用 php 对其进行清理,然后进行转换。我有这个问题。所有 URL 都经过编码,我需要它是正常的解码格式。
<article type="video" enterID="33">
<addedDate>2010-12-02 16:40:26</addedDate>
<thumbnail>http://eyops.com/sdfgsefgefsoio81f8b35.jpg</thumbnail>
<asset href="http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBu927_ul_X0" addedDate="2010-12-02 16:40:23">
<duration>1500</duration>
</asset>
</article>
如何从标签中获取 href,对其进行解码,然后将输出写入 xml 文件?
【问题讨论】:
-
(参考) php.net/urldecode
标签: php xml parsing tags file-io