Sorry miss understood the question.

You won't be able to write back to the XML file located on the server
directly. You'll have to add a logic layer (ASP, PHP, C#, etc...) that you
can send the new XML data and have that layer update your XML file
(XMLConnector, WebServiceConnector, etc...)

Andrew
-----Original Message-----
From: Teresa Hardy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 08, 2007 4:12 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Help with updating a nodeValue in an XML file

This definitely loads the Flash object...I get that part. But it doesn't
write to my file called setup.xml. I am in the OReilly ActionScript book now
and this is the first time it has ever failed me. I tried parseXML and
sendAndLoad but I can't seem to write into the file.

Thanks for helping me.
Teresa

On 3/8/07, Rost, Andrew <[EMAIL PROTECTED]> wrote:
>
> All you need to do is set the nodeValue rather than access it.
>
> var trial_xml:XML = new XML("<navigation><category>This is a
> category</category></navigation>");
> trace(trial_xml.firstChild.firstChild.firstChild.nodeValue);
> trial_xml.firstChild.firstChild.firstChild.nodeValue = "This is a NEW
> category";
> trace(trial_xml.firstChild.firstChild.firstChild.nodeValue);
> trace(trial_xml);
> stop();
>
> trace output:
>
> This is a category
> This is a NEW category
> <navigation><category>This is a NEW category</category></navigation>
>
> Hope that helps,
> Andrew
> -----Original Message-----
> From: Teresa Hardy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 08, 2007 2:49 PM
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] Help with updating a nodeValue in an XML file
>
> I have been through more manuals than I can list, have also been through
> the
> complete www.lynda.com tutorial. All the examples create new nodes. I have
> not seen any example that writes to an existing node.
> Teresa
>
> On 3/8/07, dr.ache <[EMAIL PROTECTED]> wrote:
> >
> > Maybe i get you wrong, but maybe |nodeValue:String is, what you are
> > looking for.
> > Give the manual a chance - search for XMLNode
> >
> > greez,
> > dr.ache
> >
> >
> >
> > |Teresa Hardy schrieb:
> > > I thought this was really basic and easy but I just can't find the
> > > syntax to
> > > do it. All I am trying to do is update one nodeValue from the swf to
> > > the xml
> > > based on which button is selected. I don't want to make a new node,
> just
> > > update the <theme> that exists. The reading part listed below works
> > > fine. I
> > > just can't figure out how to write TO a specified child node and all
> the
> > > documentation has me totally confused. I am starting to wonder if I
> > > have to
> > > .removeNode and recreate it....I still don't have the syntax.
> > >
> > > Thanks in advance. I have been learning a huge amount from listening
> > > to all
> > > the conversations here as I teach myself ActionScript!
> > >
> > > Teresa
> > >
> > > my_xml = new XML();
> > > my_xml.ignoreWhite = true;
> > > my_xml.load("setup.xml");
> > > my_xml.onLoad = function(success) {
> > >    if (success) {
> > >        sessionInfo_xml = my_xml.firstChild;
> > >        children = sessionInfo_xml.childNodes;
> > >        folderName = children[0].firstChild.nodeValue;
> > >        maxImages = children[1].firstChild.nodeValue;
> > >        domainName = children[2].firstChild.nodeValue;
> > >        searchSubject = children[3].firstChild.nodeValue;
> > >        theme = children[4].firstChild.nodeValue;
> > >    } else {
> > >        trace("XML error");
> > >    }
> > > };
> > > _______________________________________________
> > > Flashcoders@chattyfig.figleaf.com
> > > To change your subscription options or search the archive:
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > Brought to you by Fig Leaf Software
> > > Premier Authorized Adobe Consulting and Training
> > > http://www.figleaf.com
> > > http://training.figleaf.com
> > >
> >
> > _______________________________________________
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to