public class XmlParser extends BaseParser implements IParser
FhirContext.newXmlParser() to get an instance.BaseParser.CompositeChildElement| Constructor and Description |
|---|
XmlParser(FhirContext theContext,
IParserErrorHandler theParserErrorHandler)
Do not use this constructor, the recommended way to obtain a new instance of the XML parser is to invoke
FhirContext.newXmlParser(). |
| Modifier and Type | Method and Description |
|---|---|
void |
doEncodeBundleToWriter(Bundle theBundle,
Writer theWriter) |
void |
doEncodeResourceToWriter(IBaseResource theResource,
Writer theWriter) |
<T extends IBaseResource> |
doParseResource(Class<T> theResourceType,
Reader theReader) |
String |
encodeBundleToString(Bundle theBundle) |
void |
encodeTagListToWriter(TagList theTagList,
Writer theWriter)
Encodes a tag list, as defined in the FHIR
Specification.
|
EncodingEnum |
getEncoding()
Which encoding does this parser instance produce?
|
<T extends IBaseResource> |
parseBundle(Class<T> theResourceType,
Reader theReader)
Parse a DSTU1 style Atom Bundle.
|
TagList |
parseTagList(Reader theReader)
Parses a tag list, as defined in the FHIR
Specification.
|
IParser |
setPrettyPrint(boolean thePrettyPrint)
Sets the "pretty print" flag, meaning that the parser will encode resources with human-readable spacing and
newlines between elements instead of condensing output as much as possible.
|
compositeChildIterator, containResourcesForEncoding, determineReferenceText, determineResourceBaseUrl, encodeBundleToWriter, encodeResourceToString, encodeResourceToWriter, encodeTagListToString, extractMetadataListNotNull, fixContainedResourceId, getEncodeElements, getEncodeElementsAppliesToResourceTypes, getErrorHandler, getMetaTagsForEncoding, getSuppressNarratives, isChildContained, isOmitResourceId, isStripVersionsFromReferences, isSummaryMode, isSuppressNarratives, parseBundle, parseBundle, parseResource, parseResource, parseResource, parseResource, parseTagList, preProcessValues, setEncodeElements, setEncodeElementsAppliesToResourceTypes, setOmitResourceId, setParserErrorHandler, setServerBaseUrl, setStripVersionsFromReferences, setSummaryMode, setSuppressNarratives, shouldAddSubsettedTag, throwExceptionForUnknownChildTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencodeBundleToWriter, encodeResourceToString, encodeResourceToWriter, encodeTagListToString, getEncodeElements, getEncodeElementsAppliesToResourceTypes, isOmitResourceId, isStripVersionsFromReferences, isSummaryMode, parseBundle, parseBundle, parseResource, parseResource, parseResource, parseResource, parseTagList, setEncodeElements, setEncodeElementsAppliesToResourceTypes, setOmitResourceId, setParserErrorHandler, setServerBaseUrl, setStripVersionsFromReferences, setSummaryMode, setSuppressNarrativespublic XmlParser(FhirContext theContext, IParserErrorHandler theParserErrorHandler)
FhirContext.newXmlParser().theParserErrorHandler - public void doEncodeBundleToWriter(Bundle theBundle, Writer theWriter) throws DataFormatException
doEncodeBundleToWriter in class BaseParserDataFormatExceptionpublic void doEncodeResourceToWriter(IBaseResource theResource, Writer theWriter) throws DataFormatException
doEncodeResourceToWriter in class BaseParserDataFormatExceptionpublic <T extends IBaseResource> T doParseResource(Class<T> theResourceType, Reader theReader)
doParseResource in class BaseParserpublic String encodeBundleToString(Bundle theBundle) throws DataFormatException
encodeBundleToString in interface IParserencodeBundleToString in class BaseParserDataFormatExceptionpublic void encodeTagListToWriter(TagList theTagList, Writer theWriter) throws IOException
IParserencodeTagListToWriter in interface IParsertheTagList - The tag list to encode. Must not be null.theWriter - The writer to encode toIOExceptionpublic EncodingEnum getEncoding()
IParsergetEncoding in interface IParserpublic <T extends IBaseResource> Bundle parseBundle(Class<T> theResourceType, Reader theReader)
IParserIParser.parseResource(Class, Reader) with the Bundle class found in the
ca.uhn.hapi.fhir.model.[version].resource package instead.parseBundle in interface IParserpublic TagList parseTagList(Reader theReader)
IParserparseTagList in interface IParsertheReader - A reader which will supply a tag listpublic IParser setPrettyPrint(boolean thePrettyPrint)
IParsersetPrettyPrint in interface IParserthePrettyPrint - The flagthis parser so that method calls can be chained togetherCopyright © 2014–2016 University Health Network. All rights reserved.