|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
travelling through all different nodes...with same order
dear all
can anyone help me this pls...thank u with regards - niha.. ------------------ xml structure <root> <GeneralText> <nodeA>some text A</nodeA> <nodeB>some text BBBB</nodeB> <nodeA>AAAAsome text A</nodeA> <nodeB>BBBB</nodeB> <nodeA>AAAAA</nodeA> <nodeB>textBBBB</nodeB> <nodeB>tBBBextBBBB</nodeB> </GeneralText> <GeneralText> <nodeA>A</nodeA> <nodeB>B</nodeB> <nodeA>AAAAsome text A</nodeA> <nodeB>BBBB</nodeB> <nodeA>AAA</nodeA> <nodeB>tetBBBB</nodeB> <nodeB>tBBBextBBBB</nodeB> </GeneralText> </root> ------------------ i would like to in my xsl -algorithm 1. For each <GeneralText> 2. travel through the nodes ...same order such as <nodeA>,<nodeB>,<nodeA>,<nodeB>,>,<nodeA>,<nodeB>,<nodeB> 3. if node name is = nodeA { perfom some operation ....} if node name is = node B { perfom operations B...} 4. if all nodes in GeneralText complete/just before end of for loop - { print General text completed...} ------------ xsl program <xsl:for-each select="GeneralText"> ----- 1 <xsl:for-each select="*"> 2. -- passing/travellign through all nodes......here could someone suggest - how to pass through all......in same order - if i put <xsl:for-each select="nodeA"> i can travel only nodeA - but i want pass through all ---??? so pls suggest this :: step 2 in this step 3:: here i have to test ..the node node name and perform operation according to the name <xsl:if test="name(.)='nodeA'"> { perfom some operation ....} <.xsl:if> <xsl:if test="name(.)='nodeB'"> { perfom operations B...} <.xsl:if> </xsl:for-each> <b>General Text Completed</b> ------ 4 </xsl:for-each> ------------- i wish someone help me in step 2 and step 3 thank u ever so much - with regards - niha |
|
#2
|
|||
|
|||
|
echo - thank u i will look into that
echo - thank u i will look into that
with regards niha |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > travelling through all different nodes...with same order |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|