WebSphere Message Broker, Version 8.0.0.7 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Recursive iterators

You can use a RecursiveIteratorIterator to iterate over a whole message tree, by using it to wrap around an MbsElementIterator.

The following example creates an MbsElementIterator and wraps it in a RecursiveIteratorIterator:
$it  = new MbsElementIterator($input_assembly->XMLNSC->getFirstChild());
$rii = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);

foreach($rii as $key=>$value)
{
  echo $key.'='.$value."\n";
}

For more information about the MbsElementIterator class, see MbsElementIterator.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:47:53


Concept topicConcept topic | Version 8.0.0.7 | bc28320_