diff --git a/src/JMS/Serializer/Metadata/Driver/XmlDriver.php b/src/JMS/Serializer/Metadata/Driver/XmlDriver.php
index <HASH>..<HASH> 100644
--- a/src/JMS/Serializer/Metadata/Driver/XmlDriver.php
+++ b/src/JMS/Serializer/Metadata/Driver/XmlDriver.php
@@ -63,7 +63,7 @@ class XmlDriver extends AbstractFileDriver
             $metadata->xmlRootName = (string) $xmlRootName;
         }
 
-        $readOnlyClass = !!strtolower($elem->attributes()->{'read-only'});
+        $readOnlyClass = 'true' === strtolower($elem->attributes()->{'read-only'});
 
         $discriminatorFieldName = (string) $elem->attributes()->{'discriminator-field-name'};
         $discriminatorMap = array();
Fixed issue on read only attrubute in XML mappgin