Extract XML name/value pairs from different nodes in Coldfusion

Posted by Ryan French on Stack Overflow See other posts from Stack Overflow or by Ryan French
Published on 2010-04-08T22:55:46Z Indexed on 2010/04/08 23:13 UTC
Read the original article Hit count: 324

Filed under:
|

Hi All,

I am working on some Plesk integration using the XML API and I am trying to figure out how to parse the XML response that I get back. Most of the data is fine, but the Limits and Permissions are setout differently. Essentially they are set out like so:

<data>
  <limits>
    <limit>
      <name>foo</name>
      <value>bar</value>
    </limit>
    <limit>
      <name>foo2</name>
      <value>bar2</value>
    </limit>
  </limits>
</data>

How do I extract 'bar' from the xml given that I know I want the value of 'foo', but not the value of 'foo2'?

© Stack Overflow or respective owner

Related posts about coldfusion

Related posts about Xml