Protecting XML Applications From Attacks