Skip to main content


abstract class HS.FHIRServer.Util.JSONToXML

Method Inventory


parameter DEBUG = 0;


classmethod EmitXMLObject(pPropName As %String, jsonObject As %DynamicObject, elementType As %String, prefix As %String)
classmethod EnsureDynamicObject(pJSONInput) as %DynamicObject
classmethod JSONToXML(pJSONInput, ByRef pOutputStream As %Stream.Object, pSchema As HS.FHIRServer.Schema, pIndentString As %String = "", pLineTerminator As %String = "")
API JSONToXML takes FHIR JSON as either a %DynamicObject, a %Stream.Object or %String and converts it to XML writing an %Stream provided in the call to %New() This method needs a class package to be designated as the root of the data model classes to use during this transform. Indent character(s) and line terminator character(s) for the XML output are optional.

  • pJSONInput : Input FHIR JSON as either a %DynamicObject, a %Stream.Object or %String. The latter two forms will be converted into a %DynamicObject before conversion
  • pOutputStream : FHIR XML stream !passed ByRef!. If this object is not passed in then this method initializes it as a %Stream.TmpCharacter.
  • pSchema : The FHIR Schema used to guide the conversion
  • pIndentString : (optional) Indent character(s) to use for each line in the XML output.
  • pLineTerminator : (optional) Line terminator character(s) to use for the XML output.
  • FeedbackOpens in a new tab