<cfscript>
structInsert(xmlVariable.XMLRoot.XMLChildren[nodeToInsertInto].XMLAttributes
,"attributeName",attributeValue,true);
</cfscript>
that's what the syntax looks like to add an attribute to a specific node off
the XML Root. To insert into deeper nested nodes, replace
"XMLRoot.XMLChildren[nodeToInsertInto]" with
"XMLRoot.XMLChildren[nodeToBranchOffof].XMLChildren[nodeToBranchOffof]{.XMLC
hildren[nodeToBranchOffof] to the whatever degree of depth}"
~Simon
Simon Horwith
CTO, Etrilogy Ltd.
Member of Team Macromedia
Macromedia Certified Instructor
Certified Advanced ColdFusion MX Developer
Certified Flash MX Developer
CFDJList - List Administrator
http://www.how2cf.com/
-----Original Message-----
From: Aidan Whitehall [mailto:[EMAIL PROTECTED]
Sent: 27 January 2004 12:29
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] XML attribute
OK, duh... how do you add an attribute to a CF XML object? Thanks.
--
Aidan Whitehall <mailto:[EMAIL PROTECTED]>
Macromedia ColdFusion Developer
Fairbanks Environmental Ltd +44 (0)1695 51775
Queen's Awards Winner 2003 <http://www.fairbanks.co.uk/go/awards>
Fairbanks uses anti-spam filtering. If you sent an e-mail and expected
to receive a response but didn't, please call -- it may be that your
e-mail didn't make it to the intended mailbox.
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]