Click here to Skip to main content
15,914,419 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Retriving Attributes Value from XML file Pin
Anonymous13-May-05 0:26
Anonymous13-May-05 0:26 
GeneralRe: Retriving Attributes Value from XML file Pin
Anonymous13-May-05 1:00
Anonymous13-May-05 1:00 
GeneralRe: Retriving Attributes Value from XML file Pin
Anonymous13-May-05 1:02
Anonymous13-May-05 1:02 
QuestionWhat I need to do.... Pin
Tridith12-May-05 7:54
Tridith12-May-05 7:54 
GeneralConverting flat records into hierarchial records. Pin
Maharishi Bhatia10-May-05 3:21
Maharishi Bhatia10-May-05 3:21 
GeneralXML Pin
Member 19080777-May-05 21:38
Member 19080777-May-05 21:38 
GeneralRe: XML Pin
DavidNohejl8-May-05 0:47
DavidNohejl8-May-05 0:47 
GeneralFor-each loops Pin
Dwayner795-May-05 8:38
Dwayner795-May-05 8:38 
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:

<STEP NAME="First step" ID="2" TYPE="CalibrateSPS">
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
</STEP>
<STEP NAME="another step" ID="2" TYPE="CalibrateSPS">
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
<PARAM>
<NAME>Cal sps 1</NAME>
<BLOCK>153</BLOCK>
</PARAM>
</STEP>

Here is an excert from my xsl:

<xsl:for-each select="DOC/STEP">
<h3>Step Name: <xsl:value-of select="@NAME"/> </h3>
<xsl:for-each select="PARAM">
<tr>
<td><xsl:value-of select="NAME"/></td>
<td><xsl:value-of select="BLOCK"/></td>
</tr>
</xsl:for-each>
</xsl:for-each>

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
GeneralRe: For-each loops Pin
hp10811-May-05 3:26
hp10811-May-05 3:26 
Questionxml in asp.net? Pin
mijan2-May-05 15:49
mijan2-May-05 15:49 
AnswerRe: xml in asp.net? Pin
Christian Graus2-May-05 16:10
protectorChristian Graus2-May-05 16:10 
GeneralXMLHTTP and PROXY problem Pin
karanba1-May-05 8:11
karanba1-May-05 8:11 
Generalxml-rpc Pin
Ankush_12325-Apr-05 10:32
Ankush_12325-Apr-05 10:32 
Generalretrieving remote xml data with vb.net Pin
Coreo25-Apr-05 7:12
Coreo25-Apr-05 7:12 
GeneralRe: retrieving remote xml data with vb.net Pin
Anonymous11-May-05 22:38
Anonymous11-May-05 22:38 
GeneralDataset.GetXml() problem Pin
padvit22-Apr-05 2:39
padvit22-Apr-05 2:39 
GeneralRe: Dataset.GetXml() problem Pin
chfu72224-Mar-13 21:48
chfu72224-Mar-13 21:48 
GeneralDataset.GetXml() problem Pin
Anonymous22-Apr-05 2:37
Anonymous22-Apr-05 2:37 
GeneralRe: Dataset.GetXml() problem Pin
Anonymous11-May-05 22:30
Anonymous11-May-05 22:30 
GeneralRe: Dataset.GetXml() problem Pin
Gregory Nozik25-Sep-11 17:56
Gregory Nozik25-Sep-11 17:56 
QuestionAny XSLT editor...? Pin
anderslundsgard20-Apr-05 20:35
anderslundsgard20-Apr-05 20:35 
AnswerRe: Any XSLT editor...? Pin
Christian Graus2-May-05 16:11
protectorChristian Graus2-May-05 16:11 
GeneralWant to create XML element without name spaces definition Pin
z_ahamad20-Apr-05 18:53
z_ahamad20-Apr-05 18:53 
GeneralRe: Want to create XML element without name spaces definition Pin
DavidNohejl21-Apr-05 3:22
DavidNohejl21-Apr-05 3:22 
GeneralRe: Want to create XML element without name spaces definition Pin
hp10811-May-05 3:36
hp10811-May-05 3:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.