This should be viewed as a supplement guide to oracle standard documentation! For-each in BI Publisher (and xml in general or basic programming) causes a lot of issues for new developers or business analysts. The key to understanding xml and bi publisher is “Context.”
Context: Context is used to describe where you currently at in a set of relationships. As an example: Right now your sitting down in a chair , in some room or cube, which is in building, which is in some city, some state, some country, well you get the picture.
Hierarchal Relationships: Things that exist between one more objects. An example would be a parent an child. Child is a product of the parent.
Root: is the start or the beginning of something. An example lets get to the root of the problem.
Node/Element: Basically an item of some sort. Your keys are elements of your key chain.
Let’s Get Started
The for-each tag is used to loop through and xml document. An xml document always has a root node or starting node (see bold green). All xml documents have heirachal relationships. In the example below we can see the following: an Employee is a child of dept and dept is a child of corporation. Every employee, dept and corporation have elements and these elements are typically unique to them (hence the coloring scheme).
Cont...Please scroll through