[thelist] Using XMLDOM with Coldfusion

Jon Hall jonhall at ozline.net
Tue May 21 14:48:03 CDT 2002


Try this...assuming you have MSXML 4, and if you don't, go download it.

<cfscript>
objXMLDOM = CreateObject("COM", "msxml2.DOMDocument.4.0");
objXMLDOM.async = false;
XMLloadSuccess = objXMLDOM.load("http://localhost/test.xml");
writeOutput(XMLloadSuccess);
</cfscript>

----- Original Message -----
From: "Daniel Fascia" <danfascia at totalise.co.uk>
To: <thelist at lists.evolt.org>
Sent: Tuesday, May 21, 2002 11:00 AM
Subject: [thelist] Using XMLDOM with Coldfusion


> Has anybody had experience of using the XMLDOM functions in coldfusion by
> calling the M$ COM object?? Im using this kind of structure(below) but its
a
> completely blind approach which isnt working since I dont know of anyone
doing
> this kind of thing and I dont really know CF well.. ;-(
>
> <cfobject type="COM" name="xmlDoc" class="Microsoft.XMLDOM"
action="CREATE">
> <cfset xmlDoc.async = false>
>
> <cfset xmlDoc.load("http://localhost/test.xml")>
> <cfset output = xmlDoc.selectSingleNode("greeting")>
> <cfset stuff = #output.text#>
>
> <cfoutput>
> #stuff#
> </cfoutput>
>
> Clearly this is wrong and doesnt work... I dont understand how to access
the
> .text property of a selected node.
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list