SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2006
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    the xml dom's output format and nl2br

    i'm working with the domxml in php4, and the <br /> output goes like this:
    &lt;br /&gt;&#xD;
    this happens because the XML DOM processor automatically changes the < > and /r/n chars to be XML compatible.

    did any of you ever experiment with displaying <br /> tags with XML with the set_contents function?

  2. #2
    SitePoint Evangelist
    Join Date
    Apr 2005
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Anabel
    i'm working with the domxml in php4, and the <br /> output goes like this:
    &lt;br /&gt;&#xD;
    this happens because the XML DOM processor automatically changes the < > and /r/n chars to be XML compatible.

    did any of you ever experiment with displaying <br /> tags with XML with the set_contents function?
    if at all possible, i'd recommend upgrading to php5. dom / xml support in php 4 (and early versions of php 5) is suspect.

    if that is not an option, i'd look for a good php xml class to do the dirty work so i didn't have to rely on the native dom / xml support in php 4.

    i started a thread over in the xml area that may be able to help with this issue:

    http://www.sitepoint.com/forums/showthread.php?t=354632

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2006
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i figured out i won't use the nl2br, and simple <pre></pre> the information with XSLT.

    I use godaddy's virtual private server for development for now, it's with the plesk 7.x panel control, i don't know how to install (even if it's possible) PHP5 on it....

    any ideas?


Bookmarks

Posting Permissions

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