posted 13 years ago
Hello All,
I am trying to parse an xml file using DOM parser which has entities defined inside it for
eg: <!ENTITY sample SYSTEM "sample_data" NDATA sample_ndata >
and we are referring to the sample in some tag as value for attribute. When we try to parse the xml file its throwing saxexception
org.xml.sax.SAXParseException: UndeclaredEntity: Entity 'sample' is not declared.
at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.ErrorHandlerAdaptor.error(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
If anyone has faced same issue please help me in resolving the same. Appreciate any help.
Thanks,
Rakesh.