Because the xml
you need to parse is sitting inside a CDATA
block, you'll need to re-parse the value of s1:arg0
before accessing data within it.
You will need to do this in 2 steps
- You will need to access the
arg0
node in thehttp://rules.kmtool.abc.com
namespace.
Since you don't have a NamespaceContext
for this inner xmlns, you can use :
/SOAP-ENV:Envelope/SOAP-ENV:Body/*[local-name()='invokerules']
/*[local-name()='arg0']/text()
- You then need to load this value into another
InputSource
. ThePartyId
attribute can be accessed via the path:
kbdInitiateRequest/kmTestHeader/TestParty/ConductorParty/Party/@PartyID
(no need to use local-name()
since there aren't any xmlns
in the CDATA
)