DOMDocument - prevent empty tags // retrieve node without xml declaration


/ Published in: PHP
Save to your folder(s)

the LIBXML parameter is what this snippet is about. Also this is one way to retrieve XML without having a XML-declaration prepended


Copy this code and paste it in your HTML
  1. $dom->saveXML($this->documentElement, LIBXML_NOEMPTYTAG);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.