Hi, folks.

I'm retrieving an XML packet from an API that uses the XML-RPC standard 
(http://www.xmlrpc.com/spec). 

When I connect to the Login method of this API, I need to pull the session ID 
out of the packet. I can do that long-hand with this:

<cfset local.loginResponseSID = 
local.requestXMLObject.XMLRoot.XMLChildren[1].XMLChildren[1].XMLChildren[1].XMLChildren[1].XMLChildren[1].XMLChildren[2].XMLChildren[1].XMLText
 />

But, there must be a cleaner way to do this, right? 

A note: the node that I am looking for is called <string>, BUT, if the login 
fails, there are multiple nodes called <string> in the response, so I can't do 
an XMLSearch for "//string[.]" and get just the one I need.


FYI, the specific API that I am hitting is for iThenticate and the example is 
on page 16 of this PDF: 

https://ne.edgecastcdn.net/800404/static.ithenticate.com/static/build/media/e356a7e98a516945bba0af5293e8eb48cb_iThenticateAPIGuide.pdf)

Any help to streamline this is much appreciated.

Cameron


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324068
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to