摘要: 作为一种高级软件重用技术,设计模式可以更加简便地重用成功的设计和体系结构。该文分析了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.
中图分类号:
伍星,王茜. 设计模式在HTML解析器中的应用[J]. , 2005, 31(02): 89-.
WU Xing,WANG Qian. Application of Design Pattern in HTML Parser[J]. , 2005, 31(02): 89-.