> do you still have questions?

Well, since you ask, only a few new ones...    :-)

It's working ok so far, but am obviously missing some of the finer
points. I'm working towards something like this:

<sites>
   <site ownerid="Texaco" siteid="123456"/>
   <site ownerid="Texaco" siteid="456789"/>
   <site...>
</sites.

I'm adding "site" nodes to the "sites" node using arrayAppend() and then
setting its attribute values using structInsert(). With the
structInsert() bit, in order to get a reference on the element you just
inserted, it seems like you have to arse about using:

 
xmlDoc.xmlRoot["sites"].xmlChildren[arrayLen(xmlDoc.xmlRoot["sites"].xml
Children)].xmlAttributes

Is there any form of syntax where the arrayInsert() returns a reference
to the node inserted, so you can do something like (realise this dinnae
work):

 x = arrayAppend(xmlDoc.xmlRoot["sites"].xmlChildren, xmlElemNew(xmlDoc,
"site"));
 structInsert(x.xmlAttributes, "ownerid", "Texaco");
 structInsert(x.xmlAttributes, "siteid", "123456");

Oh, and (Q2) when you do something like

 arrayAppend(xmlDoc.xmlRoot.xmlChildren, xmlElemNew(xmlDoc, "sites"));

why is one of the arguments in xmlElemNew() the XML object, when it's
also contained within one of the other arguments in the arrayAppend()
function? I would have thought that xmlElemNew() would only have taken
one argument -- the name of the element you want created.

Really appreciate everyone's help so far, btw.


-- 
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]

Reply via email to