News Feed
Jobs Feed
Sections




News Archive
Davey Shafik's Blog:
ext/dom and libxml2 charset and entities behaviors
August 11, 2009 @ 10:23:53

Davey Shafik points out a second option for the saveXML function of the DOM functionality in PHP - an option to restrict the use of "empty tags".

This argument currently only supports one value which is the constant LIBXML_NOEMPTYTAGS. This option makes sure that you do not end up with <tag /> but instead, <tag></tag>. This can make things easier if you need more predictable text to perform other changes on later.

He also noticed some other changes that the option made in his XML documents, specifically a size increase issue with spaces. Code samples are included to show these differences.

1 comment voice your opinion now!
dom extension savexml charset libxml2 emptytags


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Parsing XML with the DOM Extension for PHP 5

Mike\'s Blog: Hash Extension

Developer.com: SQLite: The Sensible Database Solution

Richard Davey's Blog: A Guide to using PHP 5 Extensions on Windows

IBM developerWorks: U2 PDO Driver Tutorial, Parts 1 & 2


Community Events











Don't see your event here?
Let us know!


language testing example interview code tool community phpunit release opinion series conference zendframework2 framework introduction functional development podcast unittest application

All content copyright, 2013 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework