如何使用Xml文件将HTML页面加载到Div中? [英] How to load html pages into Div using Xml file?

查看:123
本文介绍了如何使用Xml文件将HTML页面加载到Div中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有5个html文件.让我们说:
1.html,2.html,3.html,4.html,5.html

当我单击我的虚拟桌面"链接按钮时,以上.html文件应加载到div中.输出应为:

课程名称:1.html文件的内容

课程目标:2.html文件的内容

结构:3.html文件的内容

目标受众:4.html文件的内容

课程完成标准:5.html文件的内容



我在那里有一个.xml文件,其中包含这些.html文件的路径.所以,我的问题是
如何将.xml文件绑定到Div中,这样当我单击链接臀部时,所有.html文件都应加载到它的相应位置.我需要代码项目的解决方案.

I have 5 html files are there.Let say:
1.html,2.html,3.html,4.html,5.html

When i will click "My Virtual Desk" link button then the above .html file should load into div.The output should be:

Name of the Course: 1.html file''s content

Course Objective: 2.html file''s content

Structure: 3.html file''s content

Target Audience: 4.html file''s content

Course Completion Criteria: 5.html file''s content



I have one .xml file there which contains these .html file''s path.So,my question is
how to bind .xml file into Div such that when i will click to link buttton then all .html files should be loaded to it''s corresponding places.I need it''s solution with code project.

推荐答案

-读取XML文件
-依次打开html文件并阅读内容
-将内容放置在服务器端面板中.

这样的东西

课程名称:PANEL 1
课程目标:PANEL 2
结构:面板3
目标受众:PANEL 4
课程完成条件:小组5

用相应的html文件内容填充每个面板.
- Read the XML file
- Open the html files one by one and read the content
- Place the content in a server-side Panel.

Something like this,

Name of the Course: PANEL 1
Course Objective: PANEL 2
Structure: PANEL 3
Target Audience: PANEL 4
Course Completion Criteria: PANEL 5

Fill each panels with respective html file content.


这篇关于如何使用Xml文件将HTML页面加载到Div中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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