Index: trunk/xpressme_integration_kit/include/xml.php
===================================================================
--- trunk/xpressme_integration_kit/include/xml.php	(revision 384)
+++ trunk/xpressme_integration_kit/include/xml.php	(revision 387)
@@ -88,5 +88,6 @@
 		//libxml2 ver.2.7.0 -2.7.2 stripping leading angle brackets bug patch
 		if ( 
-			LIBXML_DOTTED_VERSION == '2.7.0' 
+			$GLOBALS['DO_LIBXML_PATCH'] == '1' 
+			|| LIBXML_DOTTED_VERSION == '2.7.0' 
 			|| LIBXML_DOTTED_VERSION == '2.7.1' 
 			|| LIBXML_DOTTED_VERSION == '2.7.2' 
Index: trunk/xpressme_integration_kit/include/xpress_block_render.php
===================================================================
--- trunk/xpressme_integration_kit/include/xpress_block_render.php	(revision 384)
+++ trunk/xpressme_integration_kit/include/xpress_block_render.php	(revision 387)
@@ -24,5 +24,7 @@
 			$xml_name = $block_name . '.xml';
 			$xml_data = xpress_cache_read($mydirname,$xml_name);
-
+			
+			$GLOBALS['DO_LIBXML_PATCH'] = get_xpress_mod_config($mydirname,'libxml_patch');
+			
 			$ret = @xpress_XML_unserialize($xml_data);
 			if (strstr($xml_data, '<?xml version="1.0" encoding="EUC-JP" ?>') !== false){
@@ -266,4 +268,24 @@
         } 
     } 
+    
+    function get_xpress_mod_config($mydirname,$conf_name=''){
+		$module_handler =& xoops_gethandler('module');
+		$xoopsModule =& $module_handler->getByDirname($mydirname);
+		$mid = $xoopsModule->getVar('mid');
+		$xoopsDB =& Database::getInstance();
+		$db_config = $xoopsDB->prefix('config');
+	    
+		$wu_sql  = 	"SELECT conf_value FROM  $db_config ";
+		$wu_sql .=	"WHERE (conf_modid = $mid ) AND (conf_name LIKE '$conf_name')";
+		$wu_res = $xoopsDB->queryF($wu_sql, 0, 0);
+			
+		if ($wu_res === false){
+			return 0;
+		} else {
+			$xu_row = $xoopsDB->fetchArray($wu_res);
+			return $xu_row['conf_value'];
+		}
+	}
+
 }	
 ?>
