Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.5.8

Bug #19542 Serializer / XML with string Input
Submitted: 2012-08-03 14:33 UTC
From: jerryzz Assigned:
Status: Open Package: HTML_AJAX (version 0.5.6)
PHP Version: 5.2.5 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2012-08-03 14:33 UTC] jerryzz (Jerry)
Description: ------------ I'm building raw text XMLL When I set Serializer = XML, I have an error with the"saveXml()" method. Btw, it's normal, $input is not an XML DOMDocument object (but text) Test script: --------------- File Serializer/XML.php $input is a good formed XML text string Expected result: ---------------- Here is my correction: function serialize($input) { if(empty($input)) { return $input; } // we check for the dom extension elseif (extension_loaded('Dom')) { return (is_a($input, 'DOMDocument')) ? $input->saveXml() : $input; } // then will check for domxml elseif (extension_loaded('Domxml')) { return (is_a($input, 'Domxml')) ? $input->dump_mem(): $input; }

Comments