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