ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIOM-78) Problems in OMElemente.getChildrenWithName() and OMElement.getChildElements()
Date Wed, 02 Nov 2011 22:47:34 GMT

    [ https://issues.apache.org/jira/browse/AXIOM-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142647#comment-13142647
] 

Andreas Veithen commented on AXIOM-78:
--------------------------------------

The issue actually occurred with the iterator returned by getChildrenWithName when calling
Iterator#next() without calling Iterator#hasNext() before. This was fixed in 1.2.11 by AXIOM-172.
                
> Problems in OMElemente.getChildrenWithName() and OMElement.getChildElements()
> -----------------------------------------------------------------------------
>
>                 Key: AXIOM-78
>                 URL: https://issues.apache.org/jira/browse/AXIOM-78
>             Project: Axiom
>          Issue Type: Bug
>         Environment: Any
>            Reporter: Saminda Wishwajith Abeyruwan
>            Assignee: Eran Chinthaka
>
> I've the following xml,
> ...
> <mtomSample>
>        <image>
>             <xop:include ....../>
>        <image>
>        <fileName>location</fileName>
> </mtomSample>
> ...
> <image/> is a binary node and <fileName/> is a regular node. 
> say i have obtained the mtomSample element,
> Then if i say 
>       Iterator _ite1 = mtomSample.getChildrenWithName(new Qname("image"));  I'm getting
the image elements. Assume i extracted the OMText (binary) out of it. 
> Now if i say 
>  Iterator  _ite2 = mtomSample.getChildrenWithName(new Qname("fileName")); i should be
getting a collection of "fileName" elements. Instead it's pointing again to the "image"  element
collection. 
> If i do _ite2 first and then _ite1,  then it's always pointing to the "fileName" element
collection. 
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Now if i say mtomSample.getChildElements(), and when getting the elements out of the
iterator, it only contains <image/> element. No <fileName/> element is present
in the iterator. 
> now if i change the order as, 
> <mtomSample>
>        <fileName>location</fileName>
>        <image>
>             <xop:include ....../>
>        <image>       
> </mtomSample>
> and do  mtomSample.getChildElements() ; i'm getting all the child elements perfectly.
 
> Seems there is a slight inconsistency in the prior two OMElement iterators. 
> Thank you
> Saminda 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message