Hi everyone! I have imported a schema (HL7 v2.5 XML schema) using the "Ensemble > Interoperate > XML" and I have built a Web Service that receives a string with an XML document that follows the schema. I have used EnsLib.EDI.XML.Document as follows to consume the string and produce the XML vDoc:
Set pInput=$ZStrip(pInput,"<>CW")

Set oXMLDoc = ##class(EnsLib.EDI.XML.Document).ImportFromString(pInput, .tSC, $this)
Quit:$System.Status.IsError(tSC)

Set oXMLDoc.DocType="ADT_A01:ADT_A01"
  It works perfectly and I use SendRequestSync() to send this documento to a business rule that will call a DTL to transform it to something else and send it away. That is when my problem arises... Here is an example of what is happening:
HSBUS>w xml.GetValueAt("MSH.MSH~12.VID~1")
<VID.1 xmlns='urn:hl7-org:v2xml'>2.5</VID.1>

HSBUS>w xml.GetValueAt("/ADT_A01/MSH/MSH~12/VID~1/text()")
2.5

HSBUS>w xml.SchemaStatus
1

HSBUS>w xml.DocType
ADT_A01:ADT_A01

HSBUS>w $zv
Cache for Windows (x86-64) 2015.2.1 (Build 705U) Mon Aug 31 2015 16:45:59 EDT

 

As you can realize, the GetValueAt() method, when using schema paths, returns me the entire tag while GetValueAt() using DOM paths returns me the correct value ("2.5"). I have tried everything. The pFormat parameter on GetValueAt() won't work either. What am I missing?

 

Kind regards,

Amir Samary