The next code, create a com object for msxml. then create an element and then set
attribute for it.
If I write the code in VBS file like this:
Set xDoc = CreateObject("Microsoft.XMLDOM")
Set elem = xDoc.CreateElement("order")
elem.SetAttribute "dscr", "Description here"
xDoc.AppendChild elem
xDoc.Save "c:\inetpub\wwwroot\bnl\myFirstXML.xml"
MsgBox "Todo bien ! "
Its OK, but in CF I write
<cfobject name="xDoc" type="com" action="create" class="Microsoft.XMLDOM">
<cfset element1 = xDoc.CreateElement("Order")>
<cfset element1.SetAttribute("Dscr","Description Here")>
<cfset xDoc.AppendChild(element1)>
<cfset xDoc.Save ("c:\inetpub\wwwroot\bnl\myFirstXML.xml")>
Todo bien !
and the code fail in <cfset element1.SetAttribute("Dscr","Description Here")>
because an error about "COM error 0x80020003. Member not found."
Any suggestion?
gabriel bulfon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com