从上一个条目读取xml文件 [英] Read xml file from last entry

查看:80
本文介绍了从上一个条目读取xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




i有一个xml文件,其中包含用户的交易详情。


我使用来自php的appendChild()插入数据。


显示我需要显示最后5个条目或单个条目或使用php下降的整个条目。


无论如何都要使用php从lastentry中读取xml文件...



问候

vijay

hi

i have a xml file which has transaction details of the users.

I m inserting data using appendChild() from php.

While displaying i need to display the last 5 entry or single entry or the whole entries descending using php.

Is there anyway to read the xml file from the lastentry using php...


regards
vijay

推荐答案

您可以通过 DOMDocument SimpleXML


是的我可以。,


但是我需要读下去的条目..我无法从定义中弄清楚..


任何建议..
Yes i can.,

but i need to read the entries descendingly.. i cant figure it out from the definitions..

any suggestions..


@vjayis


排序还是出现在文件中? (元素通常按文档顺序排序,因此您可以阅读NodeList并使用它执行任何DOM功能)


您可以考虑将它们读入数组并应用任何你需要的数组函数。除此之外,您可以使用XSLT(具有排序命令)。
@vjayis
sorted or as they appear in the file? (the elements are usually sorted in document order, so you can read the NodeList and do any DOM functions with it that you need)

you may consider reading them into an array and apply any array functions you need. other than that you may use XSLT (which has a sort command).


这篇关于从上一个条目读取xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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