How to use the prepared statement for Microsoft SQL Xpath queries in java

I'm having a hard time trying to use the Prepared Statement for the sql xpath xml query that follows in Java.

SELECT * FROM dbo.EMPLOYEE_DTLS WHERE EMPLOYEE_DTLS.EMP_XML.exist (& # 39; // emp / empId[text()[1]=?]& # 39;) = 1 AND (EMPLOYEE_DTLS.EMP_XML.exist (& # 39; // emp / designationList / designation[contains(.,?)]& # 39;) = 1 OR EMPLOYEE_DTLS.EMP_XML.exist (& # 39; // emp / designationList / designation[contains(.,?)]& # 39;) = 1 OR 1! = 1)

I would like to set values ​​for all places with? symbol. From the? is within the single quotes in xpath, it is not considered a placeholder and I can not set the values. Can someone help me with this? Any help is really appreciated.