-
October 19th, 2021, 05:05 PM
#1
Xpath expression to extract value from a node/element
Hi,
Please see the xml below. I am trying to write an Xpath expression to retrieve the string value from the element "SessionID". The code I wrote,
./IDMResponse/Worker/SessionId/text()
or
./WorkerID/SessionId/text()
returns no value. Please help me with this.
<?xml version="1.0" encoding="utf-8"?>
<IDMResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="1" xmlns="http://www.nrf-arts.org/IXRetail/namespace/">
<ARTSHeader>
<MessageID>1</MessageID>
<Response ResponseCode="Ok">
<RequestID>1</RequestID>
</Response>
</ARTSHeader>
<Worker MajorVersion="1" MinorVersion="0" FixVersion="1">
<WorkerID>9968632a-fbb2-41a7011cab</WorkerID>
<AllowedForBarcodeAuthentication>false</AllowedForBarcodeAuthentication>
<LegalName><Name>jam</Name>
<FullName>jam admin</FullName>
</LegalName>
<DisplayName>dax</DisplayName>
<SecurityIdentifier TypeCode="UserName">jamadmin</SecurityIdentifier>
<WorkLocation><HomeStore /></WorkLocation>
<SessionId>194e7418-600e2b0fb</SessionId>
<DaysToExpire>-1</DaysToExpire>
</Worker>
</IDMResponse>
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|