Skip to main content
Inspiring
April 4, 2007
Question

XML Node Name

  • April 4, 2007
  • 1 reply
  • 238 views
I am working on a project where the XML file doesn't always have the same stuff in it. So I need to be able to read the node names but I can't remember how in CF. argh. Tried searching on it and came up blank.

So if you are quick you may help me here before it hits me in the face like a baseball bat. 🙂
This topic has been closed for replies.

1 reply

Inspiring
April 4, 2007
You could probably do that a couple of ways: XMLSearch(xmlDoc, xPath) or loop over the XMLChildren nodes of your parent element and retrieve the element name manually. I forget the structure notation for the element name (I think its something like NodeName), but a <cfdump> should illuminate the situation.

Hope that helps!