[jdom-interest] Checking for attributes without namespace in class Element

stephan.segschneider at snellwilcox.com stephan.segschneider at snellwilcox.com
Thu Jun 28 06:55:28 PDT 2001

Dear all

I have just changed my code to work with JDOM beta 7R2. Everything works fine
but the new setAttribute() method in Element.
At the moment a checking for an already existing attribute happens only if the
attribute uses a namespace prefix (see line 1603 in Element.java). I don't think
that's sensible. In other words, you can't use setAttribute() to update an
attributes value if you use no namespace prefix. You always need to check inside
your code if an attribute already exists before you update its value.

In case I'm right with my view of how it should work I have attached a file
containing the changed setAttribute() method in Element.java file.



PS: sorry for posting my message in the first place which was exceeding the size
of 64k
  Stephan Segschneider
  Snell & Wilcox Ltd. UK
  Voice : +44 (0)1730 818 747
  EMail : stephan.segschneider at snellwilcox.com  (office)

The contents of this communication are confidential to the normal user of
the email address to which it was sent.  If you have received this email
in error, any use, dissemination, forwarding, printing or copying of this
email is strictly prohibited.  If this is the case, please notify the sender
and delete this message.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Element_setAttribute.java
Type: application/octet-stream
Size: 4242 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20010628/c1d90264/Element_setAttribute.obj

More information about the jdom-interest mailing list