我需要用JSP做一个地址簿,用XML存数据,大家给点建议,我该怎么做,怎么入手?来者有分。

Tarloy 2001-10-25 07:04:05
我有JAXP了,该怎么做.
...全文
99 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
National 2001-11-03
  • 打赏
  • 举报
回复
1.XML的单个文件存储容量如果过大,会对你的地址本的存取速度产生影响,所以要生成多个XML文件来存储。
2.推荐使用DOM编程,它能将你所得到的表单数据直接转化为DOM对象,然后存储。
3.SAX方式我个人觉得不好控制,当然它的好处是快速和占用较少的资源。
4.Dom提供的方法参见jaxp文档。
karma 2001-10-26
  • 打赏
  • 举报
回复
say you are going to make 地址簿 as a xml file, you probably need two jsp files to make it work
1. one jsp page will be used to enter the 地址 information, this page will be used either to input a new 地址 or modify an existing 地址. You will save the information by adding nodes/modifying existing nodes to/in your xml file
1. the other jsp will list the 地址 in the 地址簿, you probably can write an XSLT style to convert the xml into html code with Xalan XSLT processor, in which you will probably have a few buttons, add new/edit/delete, add new/edit will send the information to the first page
3. apparently you are going to manipulate your XML. The easier way is to load your XML file into a DOM object, using Xerces or some other Java parsers. Of course, when your XML file becomes bigger, loading the whole thing into memory will become a burden. So, you might want to try out SAX parser at that time.
willwzq 2001-10-25
  • 打赏
  • 举报
回复
gz
Jneu 2001-10-25
  • 打赏
  • 举报
回复
up
Jneu 2001-10-25
  • 打赏
  • 举报
回复
gz
study_vc 2001-10-25
  • 打赏
  • 举报
回复
jsp-servlet-xml交互

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧