You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/19 10:35:51 UTC

[jira] Commented: (AXIS-1419) bug in getElementsByTagName of MessageElement

The following comment has been added to this issue:

     Author: Jongjin Choi
    Created: Tue, 19 Oct 2004 1:35 AM
       Body:
I'm afraid that Ashutosh's patch will not solve this problem.

I think that there are three points in this issue.
1. processing '*'
2. preorder traversal of tree 
3. There are similar methods in Element and Document.
   Element.getElementsByTagName / Element.getElementsByTagNameNS
   Document.getElementsByTagName / Docuement.getElementsByTagNameNS
   (implemented in MessageElement and SOAPDocumentImpl)

I think that xerces's implmentation 'DeepNodeListImpl' will be a appropriate solution for this.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1419?page=comments#action_54336

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1419

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1419
    Summary: bug in getElementsByTagName of MessageElement
       Type: Bug

     Status: Open
   Priority: Major

    Project: Axis
 Components: 
             SAAJ
   Versions:
             1.2 Beta

   Assignee: Davanum Srinivas
   Reporter: nishant kumar

    Created: Mon, 28 Jun 2004 3:38 AM
    Updated: Tue, 19 Oct 2004 1:35 AM

Description:
there is bug in the following method of MessageElement

public NodeList getElementsByTagName(String name) {
.....
  // add 2nd Generation
  for(int i =0; i < children.size(); i++){
    nodelist.addChild((MessageElement)children.get(i));
  }
....
}

first of all why should all the children be blindly added to the nodelist without making any checks for the name.

secondly why does one think that all the children will be instance of MessageElement that one has once again blindly casted the children into MessageElement


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira