Results 1 to 3 of 3

Thread: parsing

  1. #1
    159
    posts
    Registered User

    parsing

    Is there a way to add a link in a XML file while parsing using PhP??

    For example:

    file.xml
    <description>Please click on this link</description>

    I want to put a link under "this link" just like :
    <description>Please click on <a href="...">this link</a></description>

  2. #2
    you'd have to make it another node like
    <description>Please click on this link</description>
    <link><a href="..."></link>

    then just load the link on the text with the loop when you display it


    member #1 of the "XML-is-a-crutch-to-make-people-feel-elite-club"
    K-Emmys-06: Best Quote K-Emmys-06: Flash Genious

  3. #3
    176
    posts
    Registered User
    you can add the link but its not going to do anything ... and keep in mind that you can't use < & > " ' inside the node. You'll have to encase it in a <![CDATA[ ... ]]>

    Check this site for more info

    Ex:
    Code:
    <description><![CDATA[ Please click on <a href="...">this link</a> ]]></description>
    or
    Code:
    <description>Please click on & lt;a href=&quot;...&quot;& gt;this link& lt;/a& gt;</description>
    PHP Code:
    <zip> echo this; </zip

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012