         }
     }
     
-    protected function internal_encodeValue(obj:Object, 
+    internal function internal_encodeValue(obj:Object, 
                                             qname:XObjQName, 
                                             parentNode:XMLNode, 
                                             recurse:Boolean=true, 

            newNode.nodeName = XObjUtils.encodeElementTag(qname, newNode);
            return newNode;
        }
        else if (referenceOnly)
        {
            return internal_encodeValue(obj, qname, parentNode, false, true);

            parentNode.parentNode = xmlDocument;
        }
        
        encodeValue(obj, qname, parentNode, true, false, true);
        
        return xmlDocument;
    }
    
    internal function encodeReference(obj:Object, q:*, parentNode:XMLNode):XMLNode
    {
        return encodeValue(obj, q, parentNode, false, true);
    }
    
    internal function encodeValue(obj:Object, q:*, parentNode:XMLNode, recurse:Boolean=true, referenceOnly:Boolean=false, isRoot:Boolean=false):XMLNode
    {
        var qname:XObjQName = new XObjQName();
        
