开发者

Assistance with using the XPATH functionality of Voxeo's CallXML language

开发者 https://www.devze.com 2023-02-05 01:17 出处:网络
I have a basic XML response which I have formed using a PHP script, it looks lik开发者_StackOverflow中文版e this

I have a basic XML response which I have formed using a PHP script, it looks lik开发者_StackOverflow中文版e this

<?xml version="1.0"?> 
<result>
   <status>error</status>
   <message>Something has gone wrong.</message>
</result> 

I am trying to access the message string within this XML using the XPATH functionality detailed in Voxeo's CallXML language. The expressions and functions are listed here:

http://docs.voxeo.com/callxml/3.0/xpathexpr1_cxml30.htm#start

The documentation lists lot of ways to iterate over lists etc. but no simple functionality which would allow me to directly access the property I want in what seems like such simple XML. I'm completely new to XPATH and must admit it doesn't make a lot of sense to me, so it could be me and not the documentation!


You can use the code contained in this article:

Manipulate XML data with XPath and XmlDocument (C#)

http://www.codeproject.com/KB/cpp/myXPath.aspx

and use the XPath expression

/result/message

as @Alejandro said.

0

精彩评论

暂无评论...
验证码 换一张
取 消