Jim,
XMLDoc isn't defined, you have created the object with the name "Parser"
BTW it may be a good idea to give the full pathname of the file anyway
Nick
-----Original Message-----
From: Milks, Jim [mailto:[EMAIL PROTECTED]]
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
**********************************************************************
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system.
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone.
Thank you for your co-operation.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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