I need to access a specific XMLNSC value based on its name. I have an input xmlnsc that looks something like this
<Message>
<Tags>
<Name>ev1</Name>
<Length>004</Length>
<Value>0050</Value>
</Tags>
</Message>
I am trying to access <Value>element by using <Name> element. That is my statement however I think is not correct.
SET OutputRoot.JSON.Data.records[i].userId = THE (SELECT ITEM FIELDVALUE (InputRoot.XMLNSC.Message.Tags.Value)
FROM InputRoot.XMLNSC.Message.Tags
WHERE InputRoot.XMLNSC.Message.Tags.Name = 'ev1');
I'm wondering what the right way to accomplish this in ESQL would be.Thanks in advance!
I think I spotted your error. You need [] in the FROM clause. This may work (not tested):