ColdFusion and XML - what am I doing incorrectly??
Hello, all,
I've been handed a project - a very simple one - that involves uploading an XML document, parsing the data, and then populating a database with the results.
However, what isn't simple is the XML document. It's slightly over 3mb in size.
I'm setting a variable with the XML document contents (XmlParse()), and am using (successfully, for the most part) XmlSearch() to get the data.
However, I have run into a bit of a snag; and I'm not having much luck on Google.
The data is for locations around the US - each location has one ID, one Name, one City, one State, one Zip code. But each location has multiple phone numbers and email addresses. I'm trying to parse the data in such a way as I can loop through child nodes of the main information and grab only one email address and one phone number.
But no matter what I do, I cannot seem to extract a "length" or structcount of the child nodes that contain the email and phone contact information. I have tried StructCount(), ArrayLen(), xmlElement.length, and other things to no avail. Most of the error messages are: "element is undefined in Java object of type class coldfusion.xml.XmlNodeMap referenced as ''" Huh? ![]()
Anyhoo.. it's almost time to go home, but I'll try to get some code examples up, when I can.
V/r,
^_^
