public class XmlParser extends BaseParser
FhirContext.newXmlParser() to get an instance.BaseParser.CompositeChildElement, BaseParser.ElementsPath, BaseParser.EncodeContext, BaseParser.EncodeContextPath, BaseParser.EncodeContextPathElement| 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 |
doEncodeResourceToWriter(IBaseResource theResource,
Writer theWriter,
BaseParser.EncodeContext theEncodeContext) |
<T extends IBaseResource> |
doParseResource(Class<T> theResourceType,
Reader theReader) |
EncodingEnum |
getEncoding()
Which encoding does this parser instance produce?
|
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, encodeResourceToString, encodeResourceToWriter, encodeResourceToWriter, extractMetadataListNotNull, fixContainedResourceId, getCompositeElementId, getDontStripVersionsFromReferencesAtPaths, getEncodeForceResourceId, getErrorHandler, getExtensionMetadataKeys, getExtensionUrl, getMetaTagsForEncoding, getOverrideResourceIdWithBundleEntryFullUrl, getPreferTypes, getProfileTagsForEncoding, getServerBaseUrl, getStripVersionsFromReferences, getSuppressNarratives, isChildContained, isEncodeElementsAppliesToChildResourcesOnly, isOmitResourceId, isSummaryMode, isSuppressNarratives, parseResource, parseResource, parseResource, parseResource, parseResource, parseResource, preProcessValues, setDontEncodeElements, setDontStripVersionsFromReferencesAtPaths, setDontStripVersionsFromReferencesAtPaths, setEncodeElements, setEncodeElementsAppliesToChildResourcesOnly, setEncodeForceResourceId, setOmitResourceId, setOverrideResourceIdWithBundleEntryFullUrl, setParserErrorHandler, setPreferTypes, setServerBaseUrl, setStripVersionsFromReferences, setSummaryMode, setSuppressNarratives, shouldAddSubsettedTag, shouldEncodePath, shouldEncodeResource, shouldEncodeResourceId, shouldEncodeResourceMeta, throwExceptionForUnknownChildTypepublic XmlParser(FhirContext theContext, IParserErrorHandler theParserErrorHandler)
FhirContext.newXmlParser().theParserErrorHandler - public void doEncodeResourceToWriter(IBaseResource theResource, Writer theWriter, BaseParser.EncodeContext theEncodeContext) throws DataFormatException
doEncodeResourceToWriter in class BaseParserDataFormatExceptionpublic <T extends IBaseResource> T doParseResource(Class<T> theResourceType, Reader theReader)
doParseResource in class BaseParserpublic EncodingEnum getEncoding()
IParserpublic IParser setPrettyPrint(boolean thePrettyPrint)
IParserthePrettyPrint - The flagthis parser so that method calls can be chained togetherCopyright © 2014–2019 University Health Network. All rights reserved.