For-each loops
-
I am new to XML, and am having trouble switching back and forth between c# and XML. The foreach loop is not functioning as I would expect. I have a foreach loop inside of another foreach loop. My goal was to say for each step, grab the name and block from each parameter in that step. Instead, it grabs all the step names, then all the parameter info. Is there a child nodes only type function for the for each loop? Here is a sample from my XML: Cal sps 1 153 Cal sps 1 153 Cal sps 1 153 Cal sps 1 153 Cal sps 1 153 Cal sps 1 153 Here is an excert from my xsl:
Step Name:
Thanks in advance ***************** "We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
-
I am new to XML, and am having trouble switching back and forth between c# and XML. The foreach loop is not functioning as I would expect. I have a foreach loop inside of another foreach loop. My goal was to say for each step, grab the name and block from each parameter in that step. Instead, it grabs all the step names, then all the parameter info. Is there a child nodes only type function for the for each loop? Here is a sample from my XML: Cal sps 1 153 Cal sps 1 153 Cal sps 1 153 Cal sps 1 153 Cal sps 1 153 Cal sps 1 153 Here is an excert from my xsl:
Step Name:
Thanks in advance ***************** "We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
I just ran your xml/xsl in cooktop and it gave me the correct result -
Step Name: First step
Cal sps 1 153 Cal sps 1 153 Cal sps 1 153
Step Name: another step
Cal sps 1 153 Cal sps 1 153 Cal sps 1 153 ------ I did not see the DOC element in your xml - so the only change I made is: To me your loops should work the way you want!