Adrian Izadpanah · Jul 25

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 76
Discussion (3)1
Log in or sign up to continue

A little more information.

This is the XML I have:

<?xml version="1.0" encoding="UTF-8"?>
<ICNARC xmlns="">

This is the class

Class pacIPM.reqICNARC Extends (%Persistent, %Populate, %XML.Adaptor)
Property InpatientSpellidentifier As %String;

Property ACON As %String;

Property ACSD As %String;

However, I am getting the following error when I enable the service.

ERROR #6232: Datatype validation failed for tag, ADMISSION (ending at line 3 character 13), with value:

In your Business Service settings set ClassName to pacIPM.reqICNARC and ElementName to ADMISSION.

I think you set only ClassName and did not set ElementName. In that case interoperability tries to match root object - ICNARC in your case to pacIPM.reqICNARC, and it fails because pacIPM.reqICNARC class does not have ADMISSION property.