AnsweredAssumed Answered

Extracting a portion of an XML String with "MiddleValues" ?

Question asked by MorkAfur on Aug 29, 2012
Latest reply on Aug 30, 2012 by MarcMcCall

Title

Extracting a portion of an XML String with "MiddleValues" ?

Post

I have some XML where I want to extract just what's between the "<return>" and "</return>" elements.

However, when I run the code below, I get nothing.

MiddleValues ( $WSResult ; Position($WSResult; "<return>"; 1; 1) ; Position($WSResult; "</return>"; 1; 1) )

The two position functions shown give 150 and 177 respectively in the debugger.

If this function won't work for some reason (I don't see why based on the fmp12_functions_ref.pdf), how do you extract a substring from XML?

Thanks in advance.

-m

Outcomes