RE: [xmljs-users] Cannot write back to root document object...
Brought to you by:
djoham,
witchhunter
From: David J. <dj...@ya...> - 2004-07-29 18:34:37
|
I won't be able to look at this until tonight at the earliest, but I'll try to get to it as soon as possible. Can I ask a favor? Can you expand on this recreation a bit to include your source XML and everything you need to recreate this - including the creation of the objects? That will make it much easier for me to debug since I won't have to guess what your variables are or how the function is supposed to interact with the objects. It's actually easier for me when I have a slightly larger test case than the bare minimum. Sorry I wasn't clear about that originally... If you don't have time, that's OK. I'll do my best. One more favor :) Can you send the new|current recreation as a zipped up attachment to djoham[at]yahoo[dot]com please? Yahoo mail mutilates code (and text attachments) to the point of almost uselessness. It would be a big help if I was able to start with something that resembed JavaScript code rather than Perl :) Best regards, David --- Eljon Greene <eg...@re...> wrote: > Sure, > > Here is an example of the code: > > function removeNode(tElement,tOrder){ > if(pageRoot.getElementsByTagName(tElement).item(tOrder-1) != > null) { > tNode = > pageRoot.getElementsByTagName(tElement).item(tOrder-1); // Get first > element by node name (i.e. section, fieldgroup, fields) > > tNode.getElementsByTagName('active').item(0).setNodeValue("No"); // Set > active element to "No" > try { > > alert(tNode.getElementsByTagName('active').item(0).getNodeValue()); // > Displays "No" > > alert(tNode.getElementsByTagName('active').item(0).getXML()); // > Displays <active>Yes</active> > > } catch(e) { // Catch any exception > if(e.code == > DOMException.NO_MODIFICATION_ALLOWED_ERR) { > // display the error message > alert("XML Exception Error: Code > not remove " + tElement + "."); > } else { > alert("Unknown exception"); > alert(e.code); > } > } > } else { > alert("Null object"); > } > } > > Thanks for your assistance. > > Eljon > > -----Original Message----- > From: xml...@li... > [mailto:xml...@li...] On Behalf Of David > Joham > Sent: Thursday, July 29, 2004 11:33 AM > To: Eljon Greene; xml...@li... > Subject: Re: [xmljs-users] Cannot write back to root document object... > > > > Hi Eljon! > > Can you whip up a quick recreation of the problem you're seeing please? > I'll take a look and see what's up... > > > David > > --- Eljon Greene <eg...@re...> wrote: > > > Hey guys, > > > > I am new to XML for <script>. Everything is coming along pretty good > > except for one thing...That is trying to write back to the parent > > document node so that I can save this information on the server. I > > can use "DOMNode.setNodeValue()" and then use "DOMNode.getNodeValue()" > > > and it works. However when I try "DOMNode.getXML()" the old value > > still exists...I am trying to use global variables in my method > > instead of the local variables. What am I doing wrong and how do I > > write back to the "DOMDocument"? Thanks... > > > > > > Eljon Greene > > Web Software Engineer > > 877.394.5644 \\ main > > 904.567.2127 \\ direct > > eg...@re... > > www.recruitmax.com > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |