Re: [Htmlparser-user] Attributes query
Brought to you by:
derrickoswald
From: Somik R. <so...@ya...> - 2002-08-01 02:37:21
|
While using the parser, if I need to call HTMLTag.parseParameters(), I get a Hashtable. Will the keys in this hashtable be in the exact same case as they are in the HTML page or will they be in a standard form, all upper case or all lower case? Since in my project, my team works on HTMLs created by another team this could be in any case, however before conversion I would need to be able to read these attributes irrespective of case. Any ideas? Good question. Typically, you should not call parseParameters() = directly. Instead you should call : HTMLTag.getParameter("KEY"); =20 The reason is parseParameters() is a computation intensive method - you = will take a solid scalability hit if your tag keeps calling it for = parsing the table. The parsing should be done only once, and the table = created is maintained in the tag object. You can get the table too if = you wish by : HTMLTag.getParsed(). Coming to the case of the key - it is ALWAYS converted to UPPERCASE by = parseParameters(). This allows you to forget about case issues and deal = with parameters uniformly. Regards, Somik |