My application is written in Java and uses some XML code.
I am now looking into how to prevent XML Injection.
How do I validate or sanitize user input before incorporating it into an XML document or SOAP
Is it possible to block any input containing XML metacharacters such as < and >?
Can they be replaced with the corresponding entities: < and > somehow?
Can anyone point to example code that I could follow?