Jim and everyone else,

if you want an excellent start in how to merge XML with CF via MS XMLDOM COM
object go to

http://www.siteobjects.com

and download the cf_soxml tag.  Then have a look at the file soxml.cfm and
work from there.  It's an excellent tag anyway, so you may want to use it!

Paul

-----Original Message-----
From:
Sent: Tuesday, January 09, 2001 5:49 PM
To: CF-Talk
Subject: Using MSXML DOM with CF


Hi all,
I am trying to use a snippet of code from the Maryland CFUG that uses the
CFOBJECT tag to interact with the Microsoft MSXML DOM.

Here is the code:

<CFOBJECT action="CREATE" type="COM" class="Microsoft.XMLDOM" name="Parser">

<CFSET xmlFile = "sens_xml.xml">
<CFSET Parser.Async = false>
<CFSET Parser.Load(xmlFile)>
<CFIF NOT Parser.hasChildNodes()>
        <CFTHROW message="Empty XML Tree">
</CFIF>

Get the team name
<CFSCRIPT>
        league          = XMLDoc.selectSingleNode("league");
        nodeTeam        = league.selectSingleNode("team");
        team            = nodeTeam.Text;
</CFSCRIPT>

It barfs on the "XMLDoc.selectSingleNode("league");" line with the following
error:

Error resolving parameter XMLDOC.SELECTSINGLENODE
ColdFusion was unable to determine the value of the parameter. This problem
is very likely due to the fact that either:
Is the object recognized at all? Is it loading the xml document? Is my
syntax correct?
The xml document is in the same directory as the cf file.

Any help appreciated,

Jim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to