Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<Hello>
    <Title>Wish</Title>
    <Para>Hi
        <?fm condstart Omittednotes?>
            Unwanted messages
        <?fm condstart Omittednotes?>
        thanks for helping me.   
    </Para>
</Hello>


My code 1:

XML
<xsl:for-each select="Para">
    <xsl:value-of select=".">
</xsl:for-each>


Received output:Hi unwanted messages thanks for helping me

My code 2:

XML
<xsl:for each select="Para">
    <xsl:value-of select="text()">
</xsl:for each select>


Received output: Hi

Expected output: Hi thanks for helping me.
Posted
Updated 14-Jun-12 1:37am
v2
Comments
krumia 14-Jun-12 7:38am    
What is the question here?
Sandeep Mewara 14-Jun-12 8:04am    
And what are you here to ask?
rahulaaditya 15-Jun-12 2:43am    
I would like to omit the contents available in my xml file using xslt. Text content in my sample xml file Unwanted messages need to be omitted. I tried with two different options as mentioned in code1 & code2 but was not successful. I mentioned the outputs I received and also the output to be received.

Am i clear in explaining what i need?

1 solution

Hi all, since the omitted note portion is not the childnode it will be displayed for sure. Therefore I do not want to trouble you all, thanks.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900