Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
16 years ago

not able to get element value using groovyUtil

Hello,
I notice that sometime I am not able to get an element's value using groovyutils.

My code looks something like this

def holder = groovyUtils.getXmlHolder( "GetRecommendations - Request 1#Response" )
def imageURL = (holder.getNodeValue()
log.info(imageURL)

This prints out null to the console. However, if I change the Xpath to point to some other elements, I am able to get their value. so some elements work and some do not.  I get the xpath by clicking on the XML button in the response. What am I doing wrong.

Ali

1 Reply

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Ali,

    hard to know, maybe this is namespace related. Can you show/mail me a response message and xpaths that return null when the "shouldnt"?

    regards!

    /Ole
    eviware.com