Try downloading the "Leveraging XML with SQL Server 2000" PPT slide show I
gave at the DC, Baltimore, and NOVA CFUGs a few months ago.  No need to
parse the XML with the XML DOM at all... pass the XML packet directly to an
SP in one call :)  Much more efficient.  Slides are at:
http://www.figleaf.com/figleafhome/cfug/2001/CFUGApr2001/sql2000xml.zip

~Simon

Simon Horwith
Macromedia Certified Instructor
Certified Advanced ColdFusion 5 Developer
Fig Leaf Software
1400 16th St NW, # 500
Washington DC 20036
202.797.6570 (direct line)
www.figleaf.com



-----Original Message-----
From: Erika L. Walker [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 3:17 PM
To: CF-Community
Subject: RE: XML Help


It will be going into SQL Server 2000.


Erika
-------------------------------------------------- 

>>|-----Original Message-----
>>|From: Simon Horwith [mailto:[EMAIL PROTECTED]]
>>|
>>|Erika, what type of database are you sticking this data into?


---------------------------------------
>>|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>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to