DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21859>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21859

Classcast exception from setAttributeNS

           Summary: Classcast exception from setAttributeNS
           Product: Xerces2-J
           Version: 2.4.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: DOM
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I got a
  java.lang.ClassCastException
        at org.apache.xerces.dom.ElementImpl.setAttributeNS
(ElementImpl.java:671)

The easiest way to reproduce this error is to get a Xerces DOM element and do:
      elt.setAttribute("bla", "bla2");
      elt.setAttributeNS(null, "bla", "bla3");


And yes you should not be mixing DOM Level 1 and level 2 nodes, but in my 
actual encounter I thought as a jaxp-newbie that a default JAXP parse would 
leave me with Level 2 nodes (I only had the second statement in my code). Now I 
had to look in the Xerces source code to see that that is apparently not so 
(the exception is for a cast to AttrNSImpl).

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to