Article
· Mar 1, 2017 17m read
Parsing docx using XSLT

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.

6 3
1 6K

Hi.

We are going to have basic patient demographic data coming in to Cache via a webservice. I thought that I should define the input as XML something like the FHIR format (with UK extensions).

In the past we've input XML streams and used the %XML.Reader to convert them to matching classes successfully, so I thought it would be easy. However, I've found that the FHIR format stores everything in attributes like:

0 5
0 220
Article
· Feb 13, 2023 3m read
MTConnect ObjectScript Implementation

Logo

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.

4 0
0 248

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

1 0
0 749

In our team, there are several developers working in parallel on different projects. To ensure this distributed collaboration and high-quality code reviews, we rely on version control with Git. Our challenge is to harmonize the unique characteristics of InterSystems products and the possibilities of Git and Docker.

1 2
0 216

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?

1 2
0 334

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

0 1
0 331

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.

0 5
0 2.2K

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 ++.

0 2
1 127

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

0 0
0 324
Question
· Dec 19, 2016
HL7 Section to JSON

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

1 6
0 1.3K
Question
· Jul 25, 2022
Process XML document

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

0 3
0 249

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.

2 1
0 353

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

5 0
0 359