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

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="http://tempuri.org/ICMPDSv3_1.xsd">
   <ADMISSION>
      <InpatientSpellidentifier>53352</InpatientSpellidentifier>
      <ACON>U</ACON>
      <ACSD>0</ACSD>
   </ADMISSION>
</ICNARC>

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: