Forum Discussion

mcbootus's avatar
mcbootus
Contributor
15 years ago

[Res] Problem with space as the last character in an XPATH

Dear support,

I have a problem which is causing an assertion to fail because the XPATH command is not including the space, which is the last character in the result - here is the data from the XML:

<ns4:firstName>Christian SIMON </ns4:firstName>

There is a space as a last character and this is discarded in the XPATH - is there a way to keep the space?

Here is the end of the XPATH used:



........./ns4:dgConsultationInfo[1]/ns4:response[1]/ns4:contact[1]/ns4:firstName[1]



I tried adding /text() or /string() to the end of the XPATH but that did not help.

Thank you in advance,
Armen

2 Replies

  • Hello,

    can you try setting "Pretty Print" property to "false" ? It is located in bottom left corner, in the properties list.
    That should allow you to keep the extra spaces.

    Regards,
    Vladimir
    www.eviware.com
  • Dear Vladimir,

    Thanks for the info - the setting is in the Preferences / WSDL Settings now. Turning it off worked!

    Best regards,
    Armen