roryLIT
11 years agoContributor
XQuery function to get only part of a node value
I currently have the following XPath to return the value 050254774-0001 from my response XML:
declare namespace _xml='http://www.ACORD.org/standards/PC_Surety/ACORD1/xml/';
declare namespace re='http://pm.lmig.com/cl/FNOLServicesMediationModule/iAcordClaimRegistration';
//re:claimRegistrationResponse[1]/ACORD[1]/_xml:ClaimsSvcRs[1]/_xml:ClaimsNotificationAddRs[1]/_xml:ClaimsOccurrence[1]/_xml:ItemIdInfo[1]/_xml:InsurerId[1]
This is used in the Property Transfer step
I would like to be able to return just the first part of the value before the "-" so I would like to return 050254774 and leave out the -0001
Any ideas? Would I use XQuery?
Thanks
declare namespace _xml='http://www.ACORD.org/standards/PC_Surety/ACORD1/xml/';
declare namespace re='http://pm.lmig.com/cl/FNOLServicesMediationModule/iAcordClaimRegistration';
//re:claimRegistrationResponse[1]/ACORD[1]/_xml:ClaimsSvcRs[1]/_xml:ClaimsNotificationAddRs[1]/_xml:ClaimsOccurrence[1]/_xml:ItemIdInfo[1]/_xml:InsurerId[1]
This is used in the Property Transfer step
I would like to be able to return just the first part of the value before the "-" so I would like to return 050254774 and leave out the -0001
Any ideas? Would I use XQuery?
Thanks