[jdom-interest] getProperty/setProperty on Parent

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Feb 19 06:58:59 PST 2004

At 9:15 PM -0600 2/18/04, Bradley S. Huffman wrote:
>Should Parent define getProperty/setProperty so extra info can be carried
>with both Document and Element?

These methods struck me as exxtraneous fluff when I noticed them. 
Undefined properties do not reflect anything in the XML document 
that's being modeled. It's just a hack to enable users to stuff in 
any old data they forgot to put in the class. If somebody wants to 
add extra info a document it's easy enough to write a subclass that 
contains more detailed methods. That would be the correct object 
oriented way to satisfy the use-case.

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)

More information about the jdom-interest mailing list