Question
· Apr 29, 2019

read attribute in the Xdata block

I need to read the sourceClass attribute of the transform node in the Xdata block of a dtl.

given:

Class EXC.DTL.Lamont Extends Ens.DataTransformDTL [ DependsOn = (Sam.msg.lamont, Sam.lamontNext) ]
{

Parameter IGNOREMISSINGSOURCE = 1;

Parameter REPORTERRORS = 1;

Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl]
{
<transform sourceClass='Sam.msg.lamont'  targetClass='Sam.RM.lamontNext' create='new' language='objectscript' >
<annotation>Sample transformationannotation>
<code>

 

I need to return the value 'Sam.msg.lamont'  for the DTL.

Can someone point me in the right direction?

 

Thank you.

 

My progress so far is:

Set xdataID="EXC.DTL.DBEXCRXDEERWALK||DTL"
where
EXC.DTL.DBEXCRXDEERWALK is the dtl class

Set tStream=##class(%Dictionary.CompiledXData).%OpenId(xdataID)

Set tsc=##class(%XML.XPATH.Document).CreateFromStream(tStream,.tDoc)

Discussion (1)1
Log in or sign up to continue