Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: XML XSLT
I have one string in XML ,I need to read it and xtract the data only.The string is
XML string
<div id="questionText"><![CDATA[<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="HMAvenir" SIZE="20" COLOR="#000000" LETTERSPACING="0" KERNING="1"><B>3.  </B>Which animal can see in the dark?</FONT></P></TEXTFORMAT>]]></div>
I need the desired out put using xslt as
3. Which animal can see in the dark?
The value for KERNING="1" in xml string can be changed,it could be 0,1,2...
Following XSLT syntax I am writing but not getting the desired result,could you please help me
XSLT syntax
<xsl:value-of select="substring-before(substring-after(.,'KERNING=&#034;/*/&#034;&gt;'),'&lt;/FONT&gt;')"/>
Any help will be appreciated

Posted 3-Jul-12 21:08pm
Edited 3-Jul-12 21:09pm

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

  Print Answers RSS
0 OriginalGriff 205
1 Sergey Alexandrovich Kryukov 200
2 Rob Philpott 100
3 jlopez788 99
4 Prakriti Goyal 97
0 OriginalGriff 6,837
1 Sergey Alexandrovich Kryukov 5,589
2 Maciej Los 3,479
3 Peter Leow 3,323
4 DamithSL 2,505

Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 4 Jul 2012
Copyright © CodeProject, 1999-2014
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