User bio
404 bio not found
Member since Nov 7, 2023
Replies:

Okay, with a bit of fiddling, that did the trick. I have attempted to set PrefixMappings in my previous solutions but it appears I did it wrong then.

Output:

HSROUTER>Set tPnRXML.PrefixMappings="ns urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
HSROUTER>w tPnRXML.EvaluateExpression("/XMLMessage/ContentStream/ns:RegistryResponse/ns:RegistryErrorList/ns:RegistryError","@errorCode",.tPnRResult)
1
HSROUTER>w tPnRResult.Size                                                      
0
HSROUTER>w tPnRXML.EvaluateExpression("/ContentStream/ns:RegistryResponse/ns:RegistryErrorList/ns:RegistryError","@errorCode",.tPnRResult)
1
HSROUTER>w tPnRResult.Size                                                      
0
HSROUTER>w tPnRXML.EvaluateExpression("/ns:RegistryResponse/ns:RegistryErrorList/ns:RegistryError","@errorCode",.tPnRResult)
1
HSROUTER>w tPnRResult.Size                                                     
1
HSROUTER>w tPnRResult.GetAt(1).Value                                           
XDSRegistryDeprecatedDocumentError

Thank you very much.

Output on my machine:

HSROUTER>w tPnRXML.EvaluateExpression("/XMLMessage/ContentStream/RegistryResponse/RegistryErrorList/RegistryError","@errorCode",.tPnRResult)
1
HSROUTER>set tErrorCode = tPnRResult.GetAt(1).Value                              
SET tErrorCode = tPnRResult.GetAt(1).Value
^
<INVALID OREF>
HSROUTER>w tPnRResult.Size                                                      
0

(tPnRXML was set higher)

I believe this is due to the XML Document being created from the ContentStream part of the Response body. However the simple solution of just removing the first (two) steps of the XPath doesn't help either.

HSROUTER>w tPnRXML.EvaluateExpression("/ContentStream/RegistryResponse/RegistryErrorList/RegistryError","@errorCode",.tPnRResult)
1
HSROUTER>w tPnRResult.Size                                                      
0
HSROUTER>w tPnRXML.EvaluateExpression("/RegistryResponse/RegistryErrorList/RegistryError","@errorCode",.tPnRResult)
1
HSROUTER>w tPnRResult.Size                                                      
0

This reveals the main reason I had to come ask for help here.

Certifications & Credly badges:
Jakub has no Certifications & Credly badges yet.
Global Masters badges:
Jakub has no Global Masters badges yet.
Followers:
Jakub has no followers yet.
Following:
Jakub has not followed anybody yet.