geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phani Madgula" <phanibalaji.madg...@gmail.com>
Subject Axis Implementation of XML DOM
Date Thu, 07 Dec 2006 07:56:29 GMT
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

Mime
View raw message