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

Bug #1082 element list doesnt gracefully handle unsupported elements
Submitted: 2004-03-27 04:39 UTC
From: alan_k Assigned: schst
Status: Closed Package: XML_XUL
PHP Version: 4.3.4 OS: na
Roadmaps: (Not assigned)    
Subscription  


 [2004-03-27 04:39 UTC] alan_k
Description: ------------ failed when loading a xul file containing commandset command - there should be a more gracefull method for handling there (perhaps just defaulting to xml_xul_Element.

Comments

 [2004-03-27 04:42 UTC] alan_k
This is not perfect - but does work. function &createElement( $name, $attributes = array(), $cdata = null, $replaceEntities = true) { $classname = sprintf( 'XML_XUL_Element_%s', $name ); $file = sprintf( 'XML/XUL/Element/%s.php', ucfirst($name) ); @include_once $file; if (!class_exists($classname)) { $classname = 'XML_XUL_Element'; }
 [2004-03-27 12:11 UTC] alan_k
it also needs to assign $element->elementName if it uses XUL_Element. - otherwise the output is unparseable..
 [2004-03-30 19:53 UTC] schst
Thank you for your bug report. This issue has already been fixed in the latest released version of the package, which you can download at http://pear.php.net/packages.php