Re: [Htmlparser-developer] How to store additional data objects in Tag class?
Brought to you by:
derrickoswald
From: Derrick O. <Der...@Ro...> - 2007-01-26 12:36:54
|
Hi Axel, Please log this as a feature request. http://sourceforge.net/tracker/?group_id=24399&atid=381402 Derrick Axel wrote: >Hi > >I've asked this already some time ago. >I would like to use some extra information in the tag nodes. Therefore >I inserted the following methods in the Tag and TagNode classes. >Does it make sense to have this simple methods in the standard >htmlparser libraries? > >Or is it better to have something like a >Tag#setExtraAttribute (String key, Object value) and >Object Tag#getExtraAttribute (String key) >methods which could store additional information per Tag as an special >attribute? > >****** Insert in file Tag.java ****** > /** > * Get the customer information for this tag > * @return > */ > public Object getCustomerInfo(); > /** > * Set the customer information for this tag if necessary > */ > public void setCustomerInfo(Object customerInfo); > >****** Insert in file TagNode.java ****** > private Object mCustomerInfo=null; > public Object getCustomerInfo(){ > return mCustomerInfo; > } > > public void setCustomerInfo(Object customerInfo){ > mCustomerInfo= customerInfo; > } > > > |