Click here to Skip to main content
12,819,140 members (30,941 online)
Rate this:
Please Sign up or sign in to vote.
See more: XML XSLT
hi all, today is my first day with XSLT. may i get help from you?
i have a xml like this:
<p >THE phone-call on Thursday evening</p>
<p>The caller was an active .</p>
<p>He had a point.</p>
<-- like this 100 para-->


if i use a xslt like this:
<xsl:for-each select="nitf/body/body.content/block">
            <xsl:value-of select="p"/>

it returns only first para value.
and if i use like this:
<xsl:for-each select="nitf/body/body.content/block/p">
            <xsl:value-of select="p"/>

then it shows nothing..
how can i get all 100 para values ?
Posted 13-Dec-12 7:36am
Updated 13-Dec-12 8:15am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is only one block. You need to do a for each on the p tags to iterate over them. ( well, it's not a for each, it's a matching rule )
choudhary.sumit 14-Dec-12 2:24am
can you provide me a XSLT format for this.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 13 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100