如何使用HTML从网页上的XML文件中读取数据。 [英] How to read data from XML file on webpage using HTML.

查看:82
本文介绍了如何使用HTML从网页上的XML文件中读取数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,



我正在制作简单的应用程序。我有XML文件,其中有一些数据保存在系统驱动器中。我在HTML页面上有按钮控件。

我想要当我点击按钮它应该在标签HTML页面上显示XML文件中的所有数据。 br />
as



名称 - XYZ



地址 - 珀斯。



请告诉我

Hi Team ,

I am making simple application . I have XML file having some data saved in system drive .I have button control on HTML page.
I want that When I click on button It should display all data from XML file on labels HTML page.
as

Name - XYZ

Address - Perth.

Please tell me

推荐答案

对不起,AFAIK您无法直接从HTML读取XML。



但是,您可以使用javascript来执行此操作。这将全部在客户端完成,因此没有服务器跳闸。这意味着它仍然是瞬时的(虽然取决于XML文件的大小)。



请参阅这个 [ ^ ]使用js读取XML。



[请接受/上调]为您鼓励他人的答案或解决方案]
Sorry, AFAIK you can not read XML right from HTML.

However, you can use javascript to do it. This will all be done on the client side, so no server trips. Which means it will still be instantaneous (although depends on the size of the XML file).

Please see this[^] for using js to read XML.

[Please accept/up-vote answers or solutions that work for you to encourage others]


这篇关于如何使用HTML从网页上的XML文件中读取数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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