PHP XML使用encoding = base64解析值 [英] PHP XML parsing with values using encoding=base64

查看:75
本文介绍了PHP XML使用encoding = base64解析值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何解析包含已编码值的XML.就我而言,我有许多使用base64编码的值:

How does one parse XML that contains values that are encoded. In my case I have a number of values that are encoded with base64:

<value encoding="base64">...</value>

使用SimpleXML似乎会忽略编码.所以必须有另一种方式...

Using SimpleXML it appears to ignore the encoding. So there must be a different way...

推荐答案

您检索值,然后使用PHP函数对其进行解码:

You retrieve the values and then decode them using PHP function:

因此XML库将为您获取内容,但是您必须对内容进行所需的操作才能使用它.

so the XML lib will get the content for you but you'll have to then do what you need with the content to make use of it.

这篇关于PHP XML使用encoding = base64解析值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆