I have a problem as follows:
<script>
    $(document).ready(function(){
        $.ajax({
            url: "https://api.domain.com/message.asp",
            type: "POST",
            cache: false,
            contentType: "text/xml",
            dataType: "text",  
            data : "<?xml version=\"1.0\"?>
                        <mainbody>
                            <header>
                                <company>companyName</company>
                                <usercode>323423</usercode>
                                <password>543543543</password>
                                <startdate>010120150100</startdate>
                                <stopdate>170820150100</stopdate>
                                <type>1</type>
                            </header>
                        </mainbody>
                    ",
            crossDomain:true,
            success: function(result){
                alert(result);
            },
            error: function(result) {
              console.log(result);
            }
        });
    });
    </script>
In the code above, the line starting with xml tag returns syntax error as follow: Uncaught SyntaxError: Unexpected token ILLEGAL What is wrong in here?
 
     
     
    