8 Followers · 235 Posts

Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.

Learn more.

Question Martin Staudigel · Feb 2, 2022

Hello community,

on my first steps with processing FHIR requests, I tried to create a capability statement resource an returning its content JSON or XML, depending on what is requested by the client.

I create a CapabilityStatement object by parsing a JSON file with:

#dim tCapStat as HS.FHIR.DTL.vR4.Model.Resource.CapabilityStatement = ##class(HS.FHIR.DTL.vR4.Model.Resource.CapabilityStatement).FromJSONFile("/opt/home/data/fhir/UkerQsCapabilityStatement.json","vR4")

then, depending on the content of pRequest.Request.ResponseFormatCode I create a HS.SDA3.QuickStream Object with

do tStrea

4
1 602
Question Ruiyan Yu · Nov 5, 2022

Hi,

I would like to use the XML Schema Wizard / %XML.Utils.SchemaReader to generate the Cache classes.

It seems Xerces has trouble with xs:import. XSD Source - DMP_Rheumatoide_Arthritis.xsd

Fehler: FEHLER #5373: Klasse 'DMP.cda.dmpclinicaldocumentheadertyp', von 'DMP.cda.levelone:property:clinicaldocumentheader' benutzt, existiert nicht
Abgeschlossen bei 2022-11-05 22:17:18

Maybe I can solve this problem by enabling this feature in Xerces somehow?

http://apache.org/xml/features/honour-all-schemaLocations

Is there any other way to work around this problem?

Best regards

Ruiyan Yu

0
0 340
Question Marco Migani · Oct 20, 2022

We have imported a CLinical Document Architecture v2 (CDA2) schema to create CDA2 content using %XML.Adaptor classes 

Schema 

https://gazelle.ihe.net/XSD/HL7/CDA/POCD_MT000040.xsd

One of the item is "observation " with value property 

Class Region.ITXX.Utility.COMMON.CDA2.Schema.POCDMT000040.Observation Extends (%RegisteredObject, %XML.Adaptor) [ CompileAfter = (Region.ITXX.Utility.COMMON.CDA2.Schema.ActClassObservation, Region.ITXX.Utility.COMMON.CDA2.Schema.NullFlavor, Region.ITXX.Utility.COMMON.CDA2.Schema.bl, Region.ITXX.Utility.COMMON.CDA2.Schema.xActMoodDocumentObservation), Procedur
0
0 257
Question Harshdeep Acharya · Mar 23, 2022

Hi Team,

Can you please help me to develop EDI X12 to XML and XML to EDI X12 conversion in IRIS 2021.1 for EDI 204, also known as Motor Carrier Load Tender?

Also, suggest flow for how to achieve this kind of functionality in InterSystems IRIS. If you are able to provide some Videos/Documents on the EDI X12 interface for 204 then it would be very helpful for me.

Thanks,

Harshdeep Acharya

1
0 424
Question Maarten Van den Vreken · Nov 10, 2017

Hi everyone,

I'm having trouble parsing XML containing unicode characters which I receive from an external webservice. I believe my file is saved properly with UTF-8 encoding but the SAX Parser still throws me an error.

I have 2 classmethods: 1 general one (get) to make a request to a webservice and return the date, and 1 (getSportsPerDate) to make a specific call and then parse the data.

ClassMethod getSportsPerDate(language As %String, date As %String){
    #dim cResponse As betradar.uof.api.descriptions.schedule.scheduleEndpoint    #dim res As %Stream.FileCharacterres=
5
0 2604
Article Sean Connelly · Apr 18, 2017 1m read

If your handling XML then it can often be unformatted for human display.

Using a little bit of XSLT magic you can format the XML in just two lines of code...

ClassMethod Format(pXmlStream As %CharacterStream, Output pXmlStreamFormatted As %CharacterStream) As %Status
{
    set xslt=##class(%Dictionary.XDataDefinition).%OpenId(..%ClassName(1)_"||XSLT",-1,.sc)
    quit ##class(%XML.XSLT.Transformer).TransformStream(pXmlStream,xslt.Data,.pXmlStreamFormatted)
}
XData XSLT
{
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output omit-xml-declaration="yes" indent="yes
1
0 727
Question Laura Cavanaugh · Aug 29, 2022

Hello; I am using a custom class extending CodeTableDetail (actually it extends CodeTableTranslated) for a MedicalClaimLine.Extension property for a Procedure Modifier value, in addition to the existing MedicalClaimLine.ProcedureModifierItems property (this is a list of %String).  This works very well, stored AND translated correctly, until a valid ProcedureModifier value is used that is all punctuation: ##,  **, or ++.

I know that the CodeTableDetail objects can not match 1.P (all punctuation), as seen in the ToQuickXML method that writes out the SDA in XML format. If a Code is all punctuati

2
1 207
Question Lewis Houlden · Aug 17, 2022

I am trying to import a large base64 string into objects but I can't seem to get it to work:

ClassMethod Test() As %Status
{
Set readerForItkRequestData = ##class(%XML.Reader).%New()
 
Set file="c:\Source\test_full.xml"
 
Set status = readerForItkRequestData.OpenFile(file)
Do readerForItkRequestData.Correlate("Envelope","Phu.Epro.Schema.Itk.Envelope")
set temp = readerForItkRequestData.Next(.pOutput,.tStatus)
Do pOutput.%Save()

}

The class I'm trying to project to: 

Class Phu.Epro.Schema.Itk.Payload Extends (%Persistent, %XML.Adaptor)
{

Parameter XMLIGNOREINVALIDTAG = 1;

Property ManifestItemId

4
0 448
Question Adrian Izadpanah · Aug 22, 2022

Hi, 

I am trying to input an entire xml into a sql server table. I am doing this via an operation in Ensemble.

I keep getting the following error

[SQL Server]XML parsing: line 0, character 0, unrecognized input signature

I have setup the table with a column parameter XML.

Here is the request object that is being sent to the store procedure

<reqSQL xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema">

<SQLScript>

{ call dbo.PopulateDataTable(?,?,?,?,?,?,?)}

</SQLScript><lstInputParams><lstInputParamsItem>

test

</lstInputParamsItem><lstIn




0
0 525
Question Kurro Lopez · Dec 19, 2016

Hi all,

I'm trying to convert a HL7 section to a XML or JSON string.

We need to save the content of PID section into a SQL Column, therefore we need to convert it into a XML o JSON string

is there any easy way to convert it?

I've tried to convert it directly into a DTL, but all my attempts have been unsuccessful

Best regards,

Francisco Lopez

6
0 1601
Question Lesley Anderson · Jul 29, 2022

I'm trying to become familiar with XSLT options in the latest version of IRIS.  The documentation here https://docs.intersystems.com/irisforhealth20221/csp/docbook/DocBook.UI… has the following statement:

InterSystems IRIS provides the following additional examples:

  • For XSLT 1.0, see the Example(), Example2(), and other methods in %XML.XSLT.Transformer.
  • For XSLT 2.0, see the class XSLT2.Examples in the SAMPLES namespace.

I don't find any reference to XSLT examples in the InterSystems GitHub. https://github.com/inters

1
0 493
Question Adrian Izadpanah · Jul 25, 2022

Hi all,

I am looking at a task which involves processing an XML file. Picking the file up from a folder (c:\test.xml) reading the data out of the XML and archiving the xml after it has been processed.

I was wondering what the best way of doing this would be?

I have got as far as creating a service in Ensemble. The Service I have created uses the class name EnsLib.XML.Object.Service.FileService.

Any advice or tutorials/guides would be much appreciated.

Many Thanks

3
0 451
Question prashanth ponugoti · Feb 3, 2022

Hi Community,

I have json equivalent persistent object in pjsonObj variable. Final JSON example below.

{
     "Document": {
                    "FileExtension": "pdf",
                    "FileContent": "JVBERi0xLjUNCiW1tbW1DQo...(very large bsae64 string)"
                }
}

Here FileContent field in json will contain converted base64 string of very large pdf(10pages). I need to submit this json as a payload to REST endpoint.

below code is working fine. 

set tSC=##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.newobj,pjsonObj,,,1,"aelqtw")
$$$LOGINFO("json"_newobj.Read())

Se

1
0 505
Article prashanth ponugoti · Jan 26, 2022 2m read

Requirement: Transform source XML message to target JSON.

step1: First create json equivalent xml from any online tool.

step2: use add in  studio utility create persistent classes from json equivalent xml and compile it , now target persistent classes are ready

step3: Do the above step for source xml or xsd and generate persistent classes for source and compile it

step4: complete the DTL by selecting root node from source, target persistent classes and complete the mappings and compile it

step5: use the below code to apply Transformation on source XML string and create Target JSON

Assume










0
0 454
Question Scott Roth · Jan 10, 2022

You might of seen or might of not seen my earlier post about Exporting a Production from 2018.1 to import it into 2021.1. I was able to get the export working, however I noticed in reviewing the data within the export, our previous Workday XML Schemas that we imported via XSD files were not in the export. When walking through the export process under Message Schema or vDoc Schema I could not find the missing XML Schema structures. Why aren't XML's part of the export process if they are used within the Production? Where are the XML Schema's kept within the Ensemble structure so I can see if the

1
0 726
Question Marcio Coelho · Dec 15, 2021

I Have a problem with a Signature validator to XML file, when this file have more than one Signature tag.

Like This

<nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="4.00">
    <NFe>
        <infNFe Id="NFexxx" versao="4.00">
            ...
        </infNFe>
        <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
            <SignedInfo>
                <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
                <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
                <Reference URI="#NFexxx">
              



3
0 578
Question Andy Stobirski · Dec 29, 2021

Hi

I'm using a class which extends %XML.Adaptor adaptor and I want to create an XML file with multiple namespaces, like the following:

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
</soap>

However, I don't see how to do this with the code I have. So far, I have

Class GMMHTIE.Docman.Messages.Request.RequestWrapper Extends (%Persistent, %XML.Adaptor){ Parameter XMLNAME = "soap:Envelope";
 Parameter NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance";
 Param
2
0 675
Question Ben Webb · Dec 2, 2021

Hi all, 
I'm trying to output a XML file, mapped from a ORU_R01 2.3 HL7 message, with a file name based of fields in the source HL7 message in the following format, 
source.{PIDgrpgrp(1).PIDgrp.PID:PatientIDInternalID(1).ID}_"-"_
source.{PIDgrpgrp(1).PIDgrp.PV1grp.PV1:VisitNumber.ID}_"-"_
source.{PIDgrpgrp(1).ORCgrp(1).OBR:ObservationDateTime.timeofanevent}
To give something like RXR0000000-000000123-20211125105415.xml as the output filename,
I initially tried to extend the EnsLib.XML.Object.Operation.FileOperation class and overwrite the OnMessage() method to allow me to specify the filename but I



1
0 441
Question prashanth ponugoti · Nov 24, 2021

Hi All,

I am working in Heath Share Heath Connect Integration.

I have a requirement to change SOAP call to REST call in integration. For SOAP call already payload is ready in XML string. and Working fine.

Now I need to make REST API call instead of existing SOAP call.

I have created REST Business Operation and ready to Call it from Business Process.

Here I should not change any Transformation in Business Process , only change  in Operation invocation

Only change is existing SOAP Operation expecting XML String , new REST Operation is expecting JSON.

How can I convert existing XML String

5
0 1013
Question Andy Stobirski · Nov 23, 2021

Hi all

I'm new to ObjectScript and I've been experimenting the correlate method of %XML.Reader to convert an XML file I've loaded into its corresponding class. But, I have found that I am not getting all the child items of an element in a List contained within the converted class, only the last item.

The XML file content is as follows:

<Results>
  <PersonIDs>
    <PersonID>1000000</PersonID>
    <PersonID>1000001</PersonID>
    <PersonID>1000005</PersonID>
  </PersonIDs> 
</Results>

I have two classes: the parent SearchResultsMessage contains a List Of the child class PersonID, as sh

6
0 598
Job Romina Sarcletti · Nov 19, 2021

A permanent job opportunity has arisen for a Caché/Ensemble /Iris developer with at least 2 years experience. My client is a specialist resource provisioner of developers for high profile clients in the finance,  healthcare, retail, distribution and credit business that are mainly based in central London. My client is looking for a highly-motivated individual who thrives in an environment where problems are open-ended. If you want to apply for the job you must be a UK resident, have a proven track record of building applications using InterSystems technologies and are able to work independentl

0
0 518
Question Scott Roth · Oct 21, 2021

Once a week we are attempting to load an XML file from Workday into a MS SQL table using JDBC and Store Procedures. There is approx 102999 records in this XML file. We are struggling with processing the entire file within a reason amount of time. We feed the XML through a BPL to then populate values in a stored procedure then call the stored procedure through a Business Operation. I have tried splitting out the Business Operations to make two calls, but we still continue to see an issue loading the XML into MS SQL. I have also gone through the JDBC driver properties to see if that would help a

4
0 449
Question Erik Svensson · Sep 14, 2018

Hi,

I have very recently started to work with Ensemble and have both the 2014 and the 2017 version. 

To learn, I have created a small test flow that takes an xml file using EnsLib.EDI.XML.Service.FileService, sends it to a Process that transforms it with xslt into another format, and then passes it onwards to a EnsLib.EDI.XML.Operation.FileOperation Business Operation. 

This is the code that I have before and when sending it onwards:

set tStatus=##class(%XML.XSLT.Transformer).TransformStreamWithCompiledXSL(xmlStreamObj, tCompiledStyleSheet, .pOutput, err)
If $$$ISERR(tStatus) quit tStatus
if $$$IS

2
0 1062
Question Flávio Lúcio Naves Júnior · Oct 15, 2021

Hello everybody,

I am trying to export a class to xml and remove the tag "xmlns" from mother class. These are my classes to create the XML.

Class Class.Test Extends (%RegisteredObject, %XML.Adaptor)
{ 

Parameter NAMESPACE = "http://mynamespace.com/test"; 
Property Person As Class.Person; Property Address As Class.Address; 

}
Class Class.Person Extends (%RegisteredObject, %XML.Adaptor)
{ 

Parameter NAMESPACE = "http://mynamespace.com/test"; 
Property name As %String; Property age As %String; 

}
Class Class.Address Extends (%RegisteredObject, %XML.Adaptor)
{ 

Parameter
1
0 631