Click here to Skip to main content
14,639,441 members
Home » Discussions » XML / XSL
   

XML / XSL

 
GeneralRe: XPath problem with % value Pin
NarVish18-Oct-11 18:39
MemberNarVish18-Oct-11 18:39 
GeneralRe: XPath problem with % value Pin
NarVish18-Oct-11 22:00
MemberNarVish18-Oct-11 22:00 
GeneralRe: XPath problem with % value Pin
NarVish18-Oct-11 22:36
MemberNarVish18-Oct-11 22:36 
QuestionHow can I put condition Pin
Noor201118-Sep-11 4:23
MemberNoor201118-Sep-11 4:23 
GeneralRe: How can I put condition Pin
AspDotNetDev18-Sep-11 7:27
protectorAspDotNetDev18-Sep-11 7:27 
AnswerRe: How can I put condition Pin
Morgs Morgan22-Sep-11 4:40
MemberMorgs Morgan22-Sep-11 4:40 
GeneralRe: How can I put condition Pin
Noor201130-Sep-11 0:43
MemberNoor201130-Sep-11 0:43 
QuestionXSLT Pin
AndyInUK14-Sep-11 3:55
MemberAndyInUK14-Sep-11 3:55 
Hi, I am having a problem in displaying XML in HTML as shown below -

XML:-

<ABC>
 <DEF>
   <GHI>Heading</GHI>
   <P/> Hello, How are you? 
   <P/> I am a Developer. 
 </DEF>
</ABC>


XSLT:-

?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <body>
  <h2>xml to html</h2>
  <table border="0">
    <xsl:for-each select="ABC/DEF">
    <tr>
      <td><xsl:value-of select="GHI" /></td><br/>
      <td><xsl:value-of select="." /></td>
    </tr>
    
    </xsl:for-each>
  </table>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>



OUTPUT -

Heading
HeadingHello, How are you?I am a Developer.


I want Heading to be in line 1 and then a line break and then comes paragraph. Also i want a space/line break between two paragraphs.

How to get following output instead -

Heading

Hello, How are you?
I am a Developer.


Thanks
Andyyy
AnswerRe: XSLT Pin
Bassam Abdul-Baki15-Sep-11 4:51
professionalBassam Abdul-Baki15-Sep-11 4:51 
GeneralRe: XSLT Pin
AndyInUK15-Sep-11 5:06
MemberAndyInUK15-Sep-11 5:06 
GeneralRe: XSLT Pin
Rhys Gravell15-Sep-11 5:27
professionalRhys Gravell15-Sep-11 5:27 
GeneralRe: XSLT Pin
Bassam Abdul-Baki15-Sep-11 5:27
professionalBassam Abdul-Baki15-Sep-11 5:27 
AnswerRe: XSLT Pin
Andi Fandrich15-Sep-11 5:18
professionalAndi Fandrich15-Sep-11 5:18 
GeneralRe: XSLT Pin
AndyInUK15-Sep-11 5:28
MemberAndyInUK15-Sep-11 5:28 
AnswerRe: XSLT Pin
Rhys Gravell15-Sep-11 5:33
professionalRhys Gravell15-Sep-11 5:33 
GeneralRe: XSLT Pin
AndyInUK15-Sep-11 5:49
MemberAndyInUK15-Sep-11 5:49 
GeneralRe: XSLT Pin
chriselst15-Sep-11 5:56
Memberchriselst15-Sep-11 5:56 
GeneralRe: XSLT Pin
AndyInUK15-Sep-11 6:09
MemberAndyInUK15-Sep-11 6:09 
GeneralRe: XSLT Pin
Bassam Abdul-Baki15-Sep-11 6:51
professionalBassam Abdul-Baki15-Sep-11 6:51 
GeneralRe: XSLT Pin
AndyInUK15-Sep-11 23:38
MemberAndyInUK15-Sep-11 23:38 
GeneralRe: XSLT Pin
PIEBALDconsult16-Sep-11 5:20
professionalPIEBALDconsult16-Sep-11 5:20 
GeneralRe: XSLT Pin
PIEBALDconsult15-Sep-11 18:10
professionalPIEBALDconsult15-Sep-11 18:10 
QuestionShould we get rid of the redundant quotes now that HTML5 does it? Pin
ed welch12-Sep-11 11:20
Membered welch12-Sep-11 11:20 
Questioni have question about rss xml. Pin
buffering837-Aug-11 16:41
Memberbuffering837-Aug-11 16:41 
AnswerRe: i have question about rss xml. Pin
Dr.Walt Fair, PE7-Aug-11 17:31
subeditorDr.Walt Fair, PE7-Aug-11 17:31 

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.