Property Transfer to Excel
- 4 years ago
Hey ccoles
The problem is the unescaped XML characters you have in your payload - I can't see your full payload in the screenshot, I can only see a segment - but I think the contents of the a:Response tag are unescaped XML.
unescaped XML represents the < > characters as < and > character strings.
The trouble with your payload containing these characters is that the XML parser that separates out the payload's tags ignores everything and treats it as character data - NOT XML.
If all the XML in your payload used < > instead of < and >, you wouldn't have this problem
There's a couple of approaches I've used to deal with this before now. You can either use groovy script, but if youre a ReadyAPI! newbie I wouldn't suggest or you can use the native functionality.
What you need to do is pass the whole unescaped string into a property and then pick out the attributes you need into additional properties. This will allow you to grab what you need from the unescaped string. This is the same approach as if you have a CDATA wrapper in your XML payload - the CDATA tag wrapper tells the XML parser to ignore the content and treat the string as character data, not XML (CDATA is typically used when you have any of the 5 XML entities as values in your XML elements --> < , >, ", ' and & which represents the specific characters <, >, ", ', and &.
So - as stated above, you need to pass the unescaped string to a property and then pick out the values from the string property into another property.
I've done this several times - follow the instructions via this page and this will sort!
ta
rich