Results 1 to 3 of 3

Thread: [RESOLVED] DOMDocument - Formatting XML output file.

  1. #1
    Join Date
    Jan 2009

    resolved [RESOLVED] DOMDocument - Formatting XML output file.

    I'm sure this will have been asked before but I cant find it in the forums - How can I format the output of an XML file that has been created using DOMDocument so that it's tags are nested properly when viewing it in a text editor, By default it just outputs a single line with no breaks... or am I missing something?

    Thanks in advance!

  2. #2
    Join Date
    Aug 2004
    See if this works better (I'm just going by some users' notes, I've not tried it):
    PHP Code:
    $domDocObj->formatOutput true;
    $domDocObj->preserveWhitespace false;
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Jan 2009
    Spot On mate!! Thanks heaps... I knew it would be something simple.

    Thanks again!

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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