作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

›› 2005, Vol. 31 ›› Issue (02): 89-.

• 论文 • 上一篇    下一篇

设计模式在HTML解析器中的应用

伍星,王茜   

  1. 重庆大学计算机学院,重庆大学计算机学院 重庆 400044
  • 发布日期:2005-01-25

Application of Design Pattern in HTML Parser

WU Xing,WANG Qian   

  1. (College of Computer,Chongqing University,Chongqing 400044)
  • Published:2005-01-25

摘要: 作为一种高级软件重用技术,设计模式可以更加简便地重用成功的设计和体系结构。该文分析了HTML语言(version4)规范的特点,将HTML语言中的每一个标签抽象成为标签类,设计过程中使用了合成模式和简单工厂模式,避免解析器设计过程中复杂关键字栈的使用,清晰了系统的设计,提高了系统的灵活性和可扩展性。

关键词: 设计模式, 合成模式, 简单工厂模式

Abstract: As an high-class software reuse technique ,design pattern can simply reuse the succeed design and architecture .This article analyses the characteristic of HTML language version 4.0,and abstracts every tag of HTML language as an object.In the process for design ,it makes full use of composite pattern and simple factory pattern to avoid the use of complicated stack, clears the design of system and improves the agility and expansibility of the system.

中图分类号: