PHP/XML Help Formatting Text

Discussion in 'PHP' started by biz12, Oct 26, 2006.

  1. #1
    Hi,
    I'm pulling data from an XML feed using the following:

     <xsl:for-each select="Results/ResultSet/AB">
          <p><a href="{@URL}"><xsl:value-of select="@heading"/></a></p>
          <p><xsl:value-of select="@content"/></p>
        </xsl:for-each>
    Code (markup):
    The @heading element has <b> tags in it...problem is they are printed not translated to html. Would anyone be able to let me know how I can get <b> tags to be translated as html.

    Thanks
    biz
     
    biz12, Oct 26, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    How are you echoing the html? Is it just <b> tags or all html thats printing out?
     
    mad4, Oct 26, 2006 IP
  3. biz12

    biz12 Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your quick reply mad4

    Figured it out the tag i needed was disable-output-escaping="yes"

    I've got alot to learn :confused:

    Cheers
    biz
     
    biz12, Oct 26, 2006 IP
  4. biz12

    biz12 Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Another quick one...

    For the anchor tag, how can i have the actual url printed & not the complete path..currently the element is linking to the file system c:\etc... even though the value of the @URL is www.domain.com
     
    biz12, Oct 26, 2006 IP
  5. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Is there a http:// in front of it? You will need to post more of the script I think.
     
    mad4, Oct 26, 2006 IP