I have below request and i want to remove DOCTYPE and its contaning ENTITY tag(s) . i dont have parser access but in class i can pass XMlOptions so is there any way that i can remove DOCTYPE using XMLOptions , so XMl enity expansion vunerbility will removed
request i am using to send
<!DOCTYPE foo [
<!ENTITY xeebri2n0 "o16ja">
<!ENTITY xeebri2n1 "&xeebri2n0;&xeebri2n0;">
<!ENTITY xeebri2n2 "&xeebri2n1;&xeebri2n1;">
<!ENTITY xeebri2n3 "&xeebri2n2;&xeebri2n2;">]>
<SubmitPaymentRequest xmlns="http://www.qwest.com/XMLSchema" xmlns:bim="http://www.qwest.com/XMLSchema/BIM">
<EPWFHeaderInfo>
<RequestId>IR1BCSRDQBSIRW7745 &xeebri2n3;<RequestId>
<SendTimeStamp>2019-12-23T14:23:01.183-05:00<SendTimeStamp>
<MessageSrcSystem>IPS<MessageSrcSystem>
</EPWFHeaderInfo>
</SubmitPaymentRequest>
EPWFSubmitPaymentEventHandler.java class where i am using above class to parse
EPWFSubmitPaymentEventHandler{
public String handleEventMessage(String inXml, XmlObject xmlBean, Map<String, String> metaInfo) {
SubmitPaymentRequestWrapper request = new SubmitPaymentRequestWrapper(inXml);
}
}
class where i am parsing the xml.
SubmitPaymentRequestWrapper {
public SubmitPaymentRequestWrapper(String reqXml, XmlOptions options) throws XmlException {
this(SubmitPaymentRequestDocument.Factory.parse(reqXml, options));
}
}
in Above SubmitPaymentRequestWrapper.java class i can not access SubmitPaymentRequestDocument.java So, is there any way that i can disbale or remove the DOCTYPE using passing XMLOptions ?