使用表单上传文件并将文件路径设置为simplexml_load_file

I want to upload a file using a form and then get its full path in the directory to call it using simplexml_load_file(). I tried this with no positive result:

/home/user-linux/Desktop/web/WebProjectbool(false)

File to upload :choose File data.kml

press This to upload

<?php

$filePath = realpath($_FILES["file"]["UploadFileName"]);
echo $filePath;//just to see if i am getting the righ path

$parse = simplexml_load_file($filePath);
var_dump($parse);

?>
<html>
    <head>
    </head>
    <body>
        <form method="POST" action="example2.php" enctype="multipart/form-data">
            <p>File to upload : <input type ="file" name = "UploadFileName"></p> 
            <br />
            <input type = "submit" name = "Submit" value = "Press THIS to upload">
        </form>
    </body>
</html>