8 Followers · 234 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 water huang · Dec 5, 2023

hi there,when object export to xml,i know that,it will call propertynameLogicalToXSD method,but i can`t find out that use %XML.Reader to parse XML to object  witch method will be called before ,

simple code like this:

Class Samples.NewClass2 Extends (%Persistent,, %XML.Adaptor)
{
Property OPDT As %Library.DateTime;
}

my xml is 

<NewClass2><OPDT>2023-11-30 11:07:02</OPDT></NewClass2>

and how parse it to object ,and not modify the xml?

4
0 496
Question Emil Odobasic · Nov 27, 2023

Hello!
I am trying access each "name" tag in the xml-file down below and want to display them through the trace in the production:

<?xml version="1.0"?>
<staff>
  <doc type="consultant">
    <name first="David" last="Marston">Mr. Marston</name>
    <name first="David" last="Bertoni">Mr. Bertoni</name>
    <name first="Donald" last="Leslie">Mr. Leslie</name>
    <name first="Emily" last="Farmer">Ms. Farmer</name>
  </doc>

</staff>

The code I have so far is this:
Method OnRequest(pRequest As Ens.StreamContainer, Output pResponse As Ens.Response) As %Status
{$$$LOGINFO("Inne i XmlFilterProcess")
   



2
0 528
Question isabella Barnes · Nov 16, 2023

Can someone share some details for creating a  pipeline for converting CCDA (XML) document into Flatfile or CSV File using IRIS.

@Marc Mundt 
@David.M 
@Paul Lomayesva

Could you please help me out identifying the inbound and outbound adapters along with the DTL process for converting CCDA into CSV Files.


Thanks in  advance!!
Isabella

3
0 528
Question Andy Stobirski · Nov 14, 2023

Hi All

I'm having a problem with cleaning user inputted text from a HealthCare system my HealthConnect system interfaces with.

The input can be anything posted into an RTF box on an app which stored in oracle, and extracted by HealthConnect from oracle via an XML based API.

When the XML is returned, various values are read out of it using %XML.XPATH.Document and it is the presence certain characters entered into the RTF fields cause XPATH to throw an error. For example,

  • ASCII character 8211 (en dash) causes XPATH to give an exception of  ERROR #6901: XSLT XML Transformer Error: invalid
4
0 745
Question Jakub Hemala · Nov 7, 2023

Hello,

I've been stuck on this for a few days so I figured I'd ask for help here.

I have an XMLMessage response from a ProvideAndRegister call which looks like this:

<?xml version="1.0"?><!-- type: HS.Message.XMLMessage  id: ### --><XMLMessagexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:s="http://www.w3.org/2001/XMLSchema"><ContentStream><RegistryResponsexmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure"><RegistryErrorListhighestSeverity="urn:oasis:names:tc:ebxml-regrep:ErrorSe
4
0 391
Question Smythe Smythee · Sep 11, 2023

Hi Community,

I have SDA file as Ens.StreamContainer Message using pRequest As Ens.StreamContainer

SDA file structure looks like this 

<Name><FamilyName>Lucy</FamilyName><GivenName>Hale</GivenName><MiddleName>Park</MiddleName></Name><Gender><Code>F</Code><Description>F</Description></Gender><BirthTime>2023-09-07T00:00:00</BirthTime>

How can i change individual value from the Steam and then save changed value into the stream?

3
1 968
Article Robert Cemper · Aug 17, 2023 1m read

Inspired by a Question from @Evgeny Shvarov and a Reply from @Ashok Kumar T
I have created a base for Global download as XML file

How to use:
 
just call the page like http://<your_server>/csp/samples2/dc.Gdown.cls?GBL=global_name

gbl-name  without the initial ^ (caret)
The output has a default name <global_name>.XML  Your choice is available.

Known Limits:

  • you have to install it at your sourcing server
  • it is not tested/working across namespaces
  • there is no partial download
  • error handling is just basic or missing

There is space for personal improvements.
and this is it:

Class dc.Gdown Exte
2
1 338
Question Ties Voskamp · Aug 3, 2023

Hi,

Using Interoperability, I can't figure out how to create separate XML's files from a CSV-file using the GUI-features Record Maps/Complex Record Mapper -> Data Transformations. I'm familiar with reading/writing the files using File Service/Operation, but don't understand the processing-steps. The preferred method by my colleagues is to do this without any Objectscript or Embedded Python coding, but if this can only be done by some coding that's fine as well.

See example below. Any help is appreciated!

Kind regards, Ties Voskamp

Example CSV:

PONumber;PODate;ArticleID;ArticleName;MeasureOfUni
2
0 335
Question Samantha Forish · Jun 16, 2023

I am working with a REST API JSON Response that contains a list of integers (departmentids).

JSON Response:

{
"status":"ACTIVE",
"departmentids":[
72
],
"subscriptions":[
{
"eventname":"LabResultAdd"
},
{
"eventname":"LabResultUpdate"
},
{
"eventname":"LabResultClose"
}
]
}

 

I am having trouble getting that to parse into my custom message structure using the %JSONImport method.

do pResponse.%JSONImport(tHttpResponse.Data.Read())

Here is my custom message class (pResponse):

Class AH.AHLIB.Custom.Athena.Message.GetEventsSubscribedResponse Extends (Ens.Response, %JSON.Ada

1
0 299
Question Nick Hershberger · Jun 13, 2023

We've implemented SAML authentication for our application where we are the service provider and various other entities are the identity providers. We've done successful connections with several identity providers including Okta, Duo Mobile, Ping Identity, and Azure. Validating the SAML response with signed assertions has been working great. Now, I am trying implement support for the SAML assertions in the response being encrypted for a new identity provider and struggling to understand procedurally how to go about this. From the sample XML below, I assume I need to decrypt the <CipherData> ele

0
0 482
Question Smythe Smythee · Jun 13, 2023

Hi Community,

I am new to CDA to CDA transformation in ensemble, Can anyone explain how  Match,Select,Varibel,Attribute,Copy,Method Will work in CDA transformation using xslt stylesheets

Smythee

0
0 214
Question Yone Moreno · May 31, 2023

Hello,

Thanks for reading this question.

How would you recommend to filter out some XML elements according to a certain criteria?

We have the following message with all patient's drug prescriptions, let's call this message [1]:

<?xml version="1.0"?><!-- type: Mensajes.Response.RESNS.RespondingGatewayCrossGatewayQueryResponse  id: 52851815 --><RespondingGatewayCrossGatewayQueryResponse><status>urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success</status><requestId/><RegistryObjectList><s01:ExtrinsicObjectid="urn:uuid:0e896256-9d21-4a9e-91ca-4de0f445c6

2
0 262
Question Thembelani Mlalazi · May 18, 2023

I am trying to call to a website that renders a xml structure as a response.if I put the url on the browser an xml rendered page is returned but if i call to this using the below code I get an object reference error which I am finding had to understand is there anyone who could help understand this error or point me in the right direction thanks.

Set tSC=$$$OK

  Set httpRequest = ##class(%Net.HttpRequest).%New()Set httpRequest.Server = "msedgewebdriverstorage.blob.core.windows.net"
  Set httpRequest.Port=443
   Set httpRequest.ContentType ="application/octet-stream" 
    ;;"application/xml"
   

2
0 400
Article Heloisa Paiva · May 3, 2023 10m read

Programming and languages

Being a programmer nowadays is basically the geek version of being a polyglot. Of course, most of us here, in the InterSystems Community, “speak ObjectScript”. Howeever, I believe this wasn’t the first language for many people. For instance, I had never heard about it prior to getting the appropriate training at Innovatium.

The most fascinating part of this is that even though we are able to learn any language and become fluent in it, we will always have our favorites – the ones we feel more comfortable and familiar with, and, as a rule, it has a lot to do with the

8
3 969
Question Yone Moreno · May 16, 2023

Good morning:


Thank you very much for reading the doubt and above all thank you very much for answering.

Given the following use case:

If we have a Destination Service that through a HTTP GET by REST gives us a certain JSON response, where it should be noted that it is a list of objects where each object in the list does NOT have a key:

[
    {
        "codigo": "5128",
        "descripcion": "LAS ENFERMERAS FRENTE A LOS PROBLEMAS DE SALUD MENTAL",
        "programa": "Probabilidad de contagio ante un accidente hemático.",
        "admitido": 1,
        "desdefecha": "26/10/2022
3
0 410
Question Sai Vusirikapally · Apr 28, 2021

Hi everyone,

I'm currently developing a TCP inbound Service to read some XML sent from a TCP Operation that uses EnsLib.TCP.CountedOutboundAdapter.

1) I have tried EnsLib.TCP.Inbound adapter but that gives this error:

ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zinitConfig+7 ^Ens.Host.1 *%New,EnsLib.TCP.InboundAdapter -- logged as '-'
number - @'
Set ..Adapter = $classmethod(..#ADAPTER,"%New")'

Due to this, the adapter is unable to start listening for incoming connections.

2) When I use EnsLib.TCP.CountedXMLInboundAdapter or EnsLib.TCP.CountedInboundAdapter instead, then the adapter st

7
0 1106
Question Joao Palma · Feb 18, 2019

Hi

I've got a string variable which I need to convert into a XML one.

My main goal here is to use the XML bit I've extracted from a HTML file in a message I need to pass over to an operation.

I'm doing the following which always errors

classMethod WriteNodes(myfile As %String)
{
    Set status=##class(%XML.TextReader).ParseString(myfile,.reader)

....

Any easy way of making this happen?

Kind regards

18
1 2311
Article water huang · Mar 19, 2023 9m read

1.Background

        1.1 I met a few project that their interface servers were crashed. Cutoms wanted resume server as fast as we can. their servers are running at lan,and they can't use git,there are some namesapce in the server running different service,and usualy there is only one server.

        1.2 In the message,it has property in type of characterstream,as you know,the message search page doesn't support filtering with  property of characterstream,so it's so hard to find the messge you want.

        1.3 Other workmate may update the code on the server,and mybe their is something wron

11
2 735
Article Eduard Lebedyuk · Mar 1, 2017 17m read

The task of handling office documents, namely docx documents, xlsx tables and pptx presentations is quite complicated. This article offers a way to parse, create and edit documents using only XSLT and ZIP.

Why? docx is the most popular document format, so the ability to generate and parse this format would always can be useful. The solution in a form of a ready-made library, can be problematic for several reasons:

  • library may not exist
  • you do not need another black box in your project
  • library restrictions : platforms, features, etc.
  • licensing
  • processing speed

In this article, I would use only basic tools for work with the docx documents.

3
1 6850
Question Andy Stobirski · Mar 17, 2023

I'm using %XML.Reader  to open an XML file and use it's correlate method to try and convert it to a class.

The conversion fails with an error of:

ERROR #6277: Type attribute, LimitedFreeTextFieldInstance, does not specify valid type for XML input tag: Field (ending at line 3 character 118).

This is the XML

<Fieldsxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><Fieldxsi:type="UDFLookupFieldInstance"ID="2925"Description="FIRE ALARM ACTIVE"Suffix="FDT_ACTIVATE"/></Fields>

This error is produced when xsi:type is any value, when it is left blank conversion using the cod

7
0 577
Article Philipp Bonin · Feb 13, 2023 3m read

In today's fast-paced and highly competitive manufacturing industry, efficient machine communication and data exchange is essential to maximize productivity and minimize downtime. That's where MTConnect comes in. MTConnect is an open, royalty-free standard that provides a common language for communication between machines, devices, and software applications in a manufacturing environment.

The MTConnect technology consists of a set of XML schemas and protocols that define the structure and format of the data to be transmitted, as well as the rules for com

Mtconnect-Technology-Overview

0
0 397
Question Mark OReilly · Jul 18, 2022

I'm not sure why on some message you cannot edit/resend and change the inforatmation in the message 

i.e. 

Property property1As Messages.MesaageType1;

Property property2 As Messages.MesaageType2;

Property property3 As list Of Messages.MesaageType3;

All extend Extends (Ens.Request, %XML.Adaptor)

is there anything we are missing? 

1
0 309
Article Ricardo Paiva · Feb 9, 2023 3m read

Schematron is a rule-based validation language for making assertions about the presence or absence of certain patterns in XML documents. A schematron refers to a collection of one or more rules containing tests. Schematrons are written in a form of XML, making them relatively easy for everyone, even non-programmers, to inspect, understand, and write

0
0 1506
Question João Carlos Azevedo · Dec 21, 2022

Hi!
I have an issue when trying to generate an object when reading an XML file. All files I'll mention will be attached to this post as a PDF file, but it's really a ZIP one.
The XML file is used as a template to generate a PDF report through the JasperSoft Report API. I checked the file consistency, and it's all right. We are able to generate the PDF file with no issues. What we need to with Caché, is to read the XML file, correlate it to an object, so we can change properties from this file. The JasperSoft Studio and API capabilities are kinda lacking in a specific way, this is why we need to





2
0 646
Question Dominic Chui · Jan 3, 2023

I have a registered object class that extends %XML.Adaptor and I want to convert an object of it into canonical XML. 

From reading the documentation and some trial and error, it seems like I would need to use %XML.Writer to write the object to XML first using the RootObject() method, then read it with %XML.Reader, and then use the Canonicalize() method of %XML.Writer to write it out again.

Is there a better approach?

2
1 617
Question Eduard Lebedyuk · Nov 30, 2022

I initialize a HS.SDA3.Container from a XML stream and I need to iterate over it twice. What is a correct way of doing it? Is it enough to adjust StreamPos/StreamOref?

The optimal solution would be to use one loop, but it's not possible to combine the processing logic.

set oSDA = ##class(HS.SDA3.Container).%New()
do oSDA.InitializeXMLParse(.tQuickStream)

while oSDA.GetNextSDA(.tType, .tPatient) {
        // processing logic A
}

set oSDA.StreamPos = 1do oSDA.StreamOref.Rewind()

while oSDA.GetNextSDA(.tType, .tPatient) {
        // processing logic B
}
4
1 550
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