Menu

Use visitor pattern to walk HTML nodes

2002-09-06
2003-01-03
  • Ernest Choi

    Ernest Choi - 2002-09-06

    I believe it would be better to adopt the visitor design pattern to recognize each HTML node.  Simple applications can still use the "instanceof" mechanism, but more complex applications can become more manageable if the visitor pattern is used.

    What do you think?

    I am currently in the process of adding the visitor design pattern to my copy of the 1.1 production source code.  If you are interested, I can forward you my changes when it is done.

    Ernest Choi

     
    • Somik Raha

      Somik Raha - 2003-01-03

      Hi Ernest,
         You might want to check out v1.2 - there are massive design changes. Visitor patterns is present though its for rendering and not identification itself. And yes, the idea is to avoid using "instanceof". v1.3 will ship with a total visitor refactoring.

      Regards,
      Somik

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.