OK. Here is my plea and cry for some XML help ... Doing some raw XML harvesting ... just want to store the results into a db.
Here is the file: http://www.projectfarm.com/nanocomputer/xmltest.xml Here is where I am trying to break each piece out in order to get ready to store it and display it: http://www.projectfarm.com/nanocomputer/xmltest.cfm And maybe I am not using the best method ... Here is my code to begin with ... --------------------------------- <!--- Create the MS XML DOM COM object ---> <cfobject action="create" type="COM" class="Microsoft.XMLDOM" name="objXMLDOM"> <cfset objXMLDOM.async = false> <!--- Location of the XML document ---> <cfset xmlinputfile = mypath & "xmltest.xml"> <!--- Load XML Document into MS XML DOM ---> <cfset check = objXMLDOM.load(xmlinputfile)> <!--- Did it returned a proper document? ---> cfset check = objXMLDOM.load(xmlinputfile)<br> <cfoutput>check = #check#</cfoutput> <hr> <!--- Load the file into a collection ---> <cfset myCollection = objXMLDOM.getElementsByTagName("record")> <!--- Loop through the collection ---> <cfoutput> <cfloop collection="#myCollection#" item="test"> <!--- Determine whether or not node has children ---> <cfset myNodesChildren = test.hasChildNodes("metadata")> <p><b>Has Children: #myNodesChildren#</b></p> <!--- If it does, get those children ---> <cfif myNodesChildren> <cfset myChildren = test.childNodes> </cfif> <cfloop collection="#myChildren#" item="node"> <b>ChildNode:</b> #node.nodeName# <br> <b>Value:</b> #node.nodeValue#<br> <b>Type:</b> #node.nodeType# <hr> </cfloop> </cfloop> </cfoutput> --------------------------------- So if anyone here is an XML guru, I would really appreciate the point in the right direction! :) I'll even shower great big kisses and hugs ... Just don't tell Phillie.... <grin> Erika (with a *K*) Plunge boldly into the thick of life! Each lives it, not to many is it known; and seize it where you will, it is interesting. - Goethe -------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
