8 Followers · 236 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 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
Question Warren Oyco · Jul 27, 2021

I've created a custom class that extends to the standard HS.Message.PatientSearchRequest. Inside the custom class i just want to pass the data as input only.

But i am getting ERROR #6277: Type attribute, s01:AcoPatientSearchRequest, does not specify valid type for XML input tag: pRequest (ending at line 5 character 171)
</error>

I tried adding Parameter XMLIGNOREINVALIDTAG = 1; and

Parameter XMLSEQUENCE = 0;

but does not seem to work. 

Class MC.ACO.Message.AcoPatientSearchRequest Extends HS.Message.PatientSearchRequest [ ClassType = persistent, Inheritance = right, ProcedureBlock ]
{

Parameter XM

8
0 678
Question Yone Moreno · Aug 4, 2021

Hello, first of all thanks for your time reading this question ◀️

We would need to achieve the following task:

We have a Ens.Response message with this structure:

<?xml version="1.0" ?>
<!-- type: Mensajes.Response.Justicia.PLATINO.EnviarIniciadoresGeneralResponse  id: 10986665 -->
<EnviarIniciadoresGeneralResponse>
    <EnviarIniciadoresGeneralOut>
        <![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<mensajeWS xmlns="https://wslexnet.webservices.lexnet/3.22"><respuestaEnvioMensaje

2
0 1415
Question Neil Thaiss · Jul 28, 2021

Hi all,

Are there limitations to the size of a file or stream that %XML.Reader will parse?

I am trying to parse a large, 573MB, XML file using either the 'OpenFile' or 'OpenStream' methods, but both return errors.

When I try to use the 'OpenStream' method I get a 'ERROR #6301: SAX XML Parser Error: input ended before all started tags were ended' error',

and when I try the 'OpenFile' method I get a 'ERROR #6301: SAX XML Parser Error: <STORE>'.

'%XML.TextReader' appears to parse the file OK, so I may be able to get use that as a workaround, but ideally I would like to get '%XML.Reader' working.

Regar

2
0 612
Question Daniel Fernández García · May 25, 2021

Hi,

I have created a method than evaluates an XML expression using the EvaluateExpression method. I need to replace an element value by other string but I couldn't find the way of doing it.

To get that, first I have created the "%XML.XPATH.Document" object using an stream and then I have evaluated the XML expression with the "EvaluateExpression" method.

1
0 788
Question Eduardo Nacimento · Mar 25, 2021

hello, 

 I need help...rsrs

 I have a query that return only one CLOB field and only one line, of oracle and  in field have a xml.

 if use  pResultSet.Get the string truncate the xml.

 I want display the xml as a service, because have many lines... i don't need iterate in xml, only get to oracle and display as xml soap.
 
 any tip help. 

thk

1
0 323
Discussion Rob Tweed · Dec 16, 2020

There's been quite a bit of discussion lately in this forum on the tools available in IRIS for using both XML and JSON, and debate on cross-conversion between the two formats.

A week or so ago I posted details of a set of tutorials I'd put together on integrating the Node.js-based QEWD technology with IRIS, working over a network.

1
0 413
Article Alberto Fuentes · Feb 18, 2021 2m read

Hi Community! 

I'm sharing a little tool (REST service) to download interoperability messages from your browser.

You only need to:

  1. Create a web application in Management Portal (e.g. /downloadmsg) and set DispatchClass=Util.DownloadMsg.
  2. Call the tool using your browser passing the namespace and the message header id to download. http://localhost:52773/downloadmsg/ns/mydev/msgid/17441
/// 
/// Util to download messages given a message header id
/// 
/// Setup:
/// 1. Create a webapplication (e.g. /downloadmsg) and set DispatchClass=Util.DownloadMsg
/// 2. Go to
0
0 515
Question Peter Charbonnier · Feb 1, 2021

The docbook chapter "Importing XML into Objects" has the following tip:

You can call the Correlate() method repeatedly to correlate more than one element, although the examples in this chapter show only one correlation.

Does anyone have a good example of multiple correlations?  I've got code running that does multiple imports of the same file while changing the correlation and it's inelegant and not really what I want.

2
0 780
Question water huang · Jan 23, 2021
<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:mif="urn:hl7-org:v3/mif" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 ../sdschemas/SDA.xsd" classCode="DOCCLIN" moodCode="EVN">
 <observation>
  <value xsi:type="ST">xxxx</value>
 </observation>
</ClinicalDocument>

this is a example XML, i don`t know how to parse it, keypoints are xmlns ,schemaLocation,xsi:type.is there a way,i could parse the xml into a object,and i can get all the data and ,i can convert the obj to a xml which is as same as the example.

4
0 3043
Question Blakely Herlick · Dec 22, 2020

Hi all! 2nd time poster and still kind of a newbie. I Googled and searched the posts but did not find anything quite like my question.  I have an XML to HL7 2.6  MFN_M16 translation.  I created an XML schema and I am using it inside a DTL to translate data to HL7. The XML is rather simple EXCEPT one element as data separated by pipes. This only happens when one item has multiple PAR Locations.  To make a valid HL7 message these multiple PAR Locations each need their own IVT segment.

XML Par Location is equal to HL7 IVT:InventoryLocationIdentifier OR (IVT-2)

The Business process is of class:

4
0 460
Question Norman W. Freeman · Dec 24, 2020

I have implemented a web service that inherit from %SOAP.WebService

It exposes classes with string properties : 

Class Employee Extends (%RegisteredObject, %XML.Adaptor) [ ProcedureBlock ]
{

Parameter XMLNAME = "Employee";
Parameter XMLSEQUENCE = 1;

Property FirstName As %String(MAXLEN = "", XMLNAME = "FirstName") [ Required ];
Property LastName As %String(MAXLEN = "", XMLNAME = "LastName") [ Required ];
...

Here is the issue: those properties are filled from a huge Caché database which contains forbidden XML characters (usually control characters in the 0-31 range).

Ideally, the

1
0 699
Question Patrik Spisak · Dec 2, 2020

Hi guys,

I have this method to create object from XML

ClassMethod XMLNew(doc As %XML.Document, node As %Integer, contOref As %RegisteredObject = "") As TruLaser.ProductionPackage
{
    Set id=""     Set tmpnode=doc.GetNode(node)
    Do tmpnode.MoveToFirstChild()
    Do {
        //compare data node to the string given by the NAMEOFEXPORTID parameter
        //which indicates the XMLNAME of the ids for this object
        If tmpnode.NodeData=..#NAMEOFEXPORTID {
            //get the text from this node; this corresponds to an id in the database
            Do tmpnode.GetText(.id)}
        While tmpnode.

1
0 426
Question James Casazza · Nov 12, 2020

In Cache WIndows environment:

Trying to use the $SYSTEM.SQL.DDLImport to import XML File that has ClassMethods, no SQL Table, but it doesn't appear to be working. I can use this ClassMethod to create SQL Tables. The manual method I have been using is to go into Cache Management Portal, Classes, Import.

I create an XML file first, then run the following to import but get no errors. Any ideas?

 Do $SYSTEM.SQL.DDLImport("Oracle",%ID,dlxml,logfl,0,"",";",2)

Beginning of XML file looks like...

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64)

2
0 301
Article Michael Smart · Oct 7, 2016 4m read

One useful feature of our REST framework is the ability for a dispatch class to identify request prefixes and forward them to another dispatch class. This approach of modularizing your URL map will improve code readability, enable you to easily maintain separate versions of an interface, and provide a means to protect API calls that only certain users will be allowed to access.

Overview

To set up a REST Service on your Caché instance, you need to define a dedicated CSP application and create the associated dispatch class that handles incoming requests.

1
0 3986
Question Norman W. Freeman · Sep 23, 2020

When you export entities like classes, routines, globals in Cache Studio, you usually end up with XML files that looks like this : 

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
    <Class name="base.monitoredpage">
        <Abstract>1</Abstract>
        <Super>%CSP.Page</Super>
        <TimeCreated>63439,41357.461462</TimeCreated>
        <Parameter name="ENCODED">
            <Default>0</Default>
        </Parameter>
        ...

I was wondering if the XSD (schema definition) of those files are available somewhere (eg : in Cache InterSystems website).

8
0 1466
Question Eduard Lebedyuk · Aug 26, 2020

I have a class:

Class test.Person Extends (%Persistent, %XML.Adaptor)
{
Property Name;
}

I want to serialize it into this XML:

<Person>
    <Id>1</Id>
    <Name>Ed</Name>
</Person>

Is it possible?

It's for the Visual Trace so I can't use %XML.Writer.

2
0 392
Question Adam Marsh · Aug 5, 2020

Greeting IRIS Community,

I need some help converting XLT (XML) into DTL (XML) pragmatically using COS or any other available options in IRIS for health.
It is for HL7-TO-nonHL7 translation. 

See the following xlt content as an example that i have in XML Format.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../server/stylesheet/xltconfig.xsl"?>
<xltconfig name="accenture-1.xlt" site="thac">
<input>
<description>HL7 2.2/2.2 ADT_A16</description>
<href>thmaster/formats/hl7/2.2/22/index.xml</href>
</input>
<output>
<description>pendingDischarge.vrl</description>
<href>thmaste

4
0 656
Question Thembelani Mlalazi · Jul 15, 2020

Lets say I have a serial Class A ,Serial Class B,Serial C and Persistent Class Ens.Request

Class SerialA Extends (%SerialObject, %XML.Adaptor) [ ProcedureBlock ]
{
      Property SerialB as SerialB  
     Property SerialC as SerialC
}
     Class SerialB Extends (%SerialObject, %XML.Adaptor) [ ProcedureBlock ]
{
    Property SerialB as %String
}

Class SerialC Extends (%SerialObject, %XML.Adaptor) [ ProcedureBlock ]
{
     Property SerialC as %String
}

Class PersistantClass Extends Ens.Request
{
     Property Record as SerialA
}

the produced xml looks like this  :

<Record>
<SerialA
4
0 386
Question Peter Geerts · Jul 4, 2020

Forgive my possible intrusion.  

I am not currently involved (yet) in any Intersystems deployment and/or development.
However I was triggered by an piece of (Intersystems) documentation residing under the Intersystems website discussing options  regarding 
Using MTOM for Attachments.  (https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?…
)
I this article there is the following sentence: 

By default, a Caché web service behaves as follows:
  • If it receives a request in an MTOM package, the web service sends the response as an MTOM package.
    Also, the IsMTOM property
2
0 385
Question Craig Alexander · Jun 26, 2020

Hi all,

We are working on getting a number of non-code based configurations and settings in fully automated deployments, and I was wondering if anyone had any ideas on how to "update" a task that already exists.

What's in our repository is a separate file for each task in the standard .xml format for:
##class(%SYS.Task).ExportTasks($lb(tTaskID),"c:\TasksExport\"_tTaskName_".xml")

The problem is, the ImportTasks method doesn't update or overwrite if the task name already exists, and there's no DeleteTask method.

We could of course, delete the task by querying %SYS.Task, finding the OID based on

2
1 458
Question Mark O'Reilly · Jun 11, 2020

I'm cautious not to ask too many questions on here, but there really doesn't seem to be a good XML end to end guide that explains these things. 

I have now a Business operation that's going to call a url like https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/Y00334?_…

I'm looking the status of the practice- I tried date but again fell flat as i wan't able to ensure i only got the end date from the first <date> tags and not any subsequent dates. 

Managed to do it kinda in a class method like so 

  set httprequest = ##class(%Net.HttpRequest).%New()
    set httprequest.SSLConfi

4
0 443
Question Daniel Sanches · Jun 28, 2019

I'm trying to sign an xml but this is showing an Id attribute in the Signature tag and the xmlns attribute is not appearing.

This is the xml generated:

<Signature Id="Id-80170FF0-0678-47D5-8C8B-771AA4E334E6">
            <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="#ID2102103519037442275900010755000000003309115569507501">
                    <Transforms>
                        <Transform
7
1 715
Question Mark O'Reilly · Apr 30, 2020

Hi:

Sorry I can't find the correct documentation for this. It's very simple I think. 

I open up an XML reader class and correlate the XML to a message type. 

My XML will read something like 

<StatusLastChecked></StatusLastChecked>

This gets correlated into a message with the following property 

Property StatusLastChecked As %String(XMLPROJECTION = "element");

I can use the following to get the other properties out 

i.e. docs.RelayedDocuments.GetAt(i).DateAdded will get the date added properties

When i try for the one with the blank value for the blank entry with a trace I get undefined traced out 

d

6
0 709