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

MbsElement arrays

When an array of MbsElement objects is assigned to an element tree, the array acts as an associative array.

For example:
$output_assembly->XMLNSC->doc->folder = $input_assembly->xpath("//item");

This example generates the following result:

<doc>
	<folder>
		<item>
			... deep copy of 1st item element
		</item>
		<item>
			... deep copy of 2nd item element
		</item>
		<item>
			... deep copy of 3rd item element
		</item>
	</folder>	
</doc>

The name of each element on the right side (in this example, item) becomes the name of the child element in the target tree. However, if the [] operator is used on the left side, item is replaced with folder, as shown in the following example:

$output_assembly->XMLNSC->doc->folder[] = $input_assembly->xpath("//item");

The example shown above generates the following result:

<doc>
	<folder>
		... deep copy of 1st item element
	</folder>
	<folder>
		... deep copy of 2nd item element
	</folder>
	<folder>
		... deep copy of 3rd item element
	</folder>	
</doc>
Notices | Trademarks | Downloads | Library | Support | Feedback

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

        
        Last updated:
        
        Last updated: 2016-05-23 14:46:34


Concept topicConcept topic | Version 8.0.0.7 | ac69004_