Open
Description
IParser parser = FhirContext.forDstu2().newJsonParser();
parser.setPrettyPrint(true);
String jsonDump = parser.encodeResourceToString(patient);
This prints proper Patient JSON but while using newXMLParser I am getting this error
detailMessage = "Unable to initialize StAX - XML processing is disabled"
cause = {FactoryConfigurationError@13489} "javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.XMLOutputFactoryBase not found"
I have added following gradle dependencies :
{
implementation "javax.xml.stream:stax-api:1.0-2" // for fhir xml parsing
implementation "ca.uhn.hapi.fhir:hapi-fhir-android:5.1.0"
implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:5.1.0"
}
configurations {
all*.exclude group: 'org.codehaus.woodstox'
all*.exclude group: 'org.apache.httpcomponents'
}
Q1: How to resolve this XML parser error ?
Q2: I can convert the Patient data in HL7 Pipes/Segments data in Android ?
In java we can use this link and this as reference. I want to achieve similar behavior in Android without using ADT_A01 object- hapi-base-2.2.jar
Metadata
Metadata
Assignees
Labels
No labels