Need a little help..Thank you...Thank you... Thank you
I completed my first java programming class six months ago. Now I been assign a project using java. So far it's comming along pretty good. I'm trying to use the "Do While" to accomplish the following in JDeveloper.
Example of the xml file:
<looptag>
looptag
<fielda>
some data
<fieldb>
some data
<fieldc>
some data
<fieldb>
some data
<fieldc>
some data
<fielda>
some data
<fieldc>
some data
<fieldc>
some data
<fielda>
some data
<fieldb>
some data
<fieldc>
some data
<fieldc>
some data
<endloop>
endloop
There are repetitive tags for field a, b, and c. Not necessary the same count for each field. I would like to write out the fields in the same order looping through the file order.
Is this the right concept.?
String looptag = "looptag";
String t = "";
String s = "";
If looptag.indexOf ("looptag") // starting point for the loop
Do
{
if fielda > 0 write to s.
else
if fieldb > 0 write to s.
else
if fieldc > 0 wite to s
}
While fielde.indexOf not equal "endloop" // end of the loop
I completed my first java programming class six months ago. Now I been assign a project using java. So far it's comming along pretty good. I'm trying to use the "Do While" to accomplish the following in JDeveloper.
Example of the xml file:
<looptag>
looptag
<fielda>
some data
<fieldb>
some data
<fieldc>
some data
<fieldb>
some data
<fieldc>
some data
<fielda>
some data
<fieldc>
some data
<fieldc>
some data
<fielda>
some data
<fieldb>
some data
<fieldc>
some data
<fieldc>
some data
<endloop>
endloop
There are repetitive tags for field a, b, and c. Not necessary the same count for each field. I would like to write out the fields in the same order looping through the file order.
Is this the right concept.?
String looptag = "looptag";
String t = "";
String s = "";
If looptag.indexOf ("looptag") // starting point for the loop
Do
{
if fielda > 0 write to s.
else
if fieldb > 0 write to s.
else
if fieldc > 0 wite to s
}
While fielde.indexOf not equal "endloop" // end of the loop