Hi
There is a problem in Axis implementation of Comment.getNodeType(). I have
the following code that recreates the issue.
*
import* javax.xml.namespace.QName;*
**import* javax.xml.soap.Node;*
**import* org.apache.axis.message.SOAPBodyElement;*
**import* org.w3c.dom.Comment;*
**public* *class* AxisXMLCommentTest {*
**public* *static* *void* main(String args[]) {*
*SOAPBodyElement sb = *new* SOAPBodyElement(*new* QName("
http://www.phanibalaji.com","test"))*;
*Comment c = sb.getOwnerDocument().createComment("TEST");*
*sb.appendChild(c);*
**if* (c.getNodeType() != Node.*COMMENT_NODE*) {*
*System.*err*.println("Node is of diffe*rent type*"); *
*} *else* {*
*System.*err*.println("Success"); *
*}
}
}
I am getting the condition *if* (c.getNodeType() != Node.*COMMENT_NODE*) as
"true". But, it must be false.
Can anybody comment?
Regards
Phani