OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] How To Modify the Contents Of XML Document Dynamically?

[ Lists Home | Date Index | Thread Index ]

Hi Andrew,

Thanks for your input. I wonder if your way can also be done with  
<TEXTAREA...> tag instead of <INPUT type="text"...> tag.  I tried the way 
you suggested me and it worked with <INPUT type="text"...>, but not with 
<TEXTAREA...>.

Thanks again,
kero


>From: "Andrew Welch" <andrew@thebristoldirectory.com>
>Reply-To: <andrew@thebristoldirectory.com>
>To: <xml-dev@lists.xml.org>
>Subject: RE: [xml-dev] How To Modify the Contents Of XML Document 
>Dynamically?
>Date: Fri, 11 Jan 2002 10:36:22 -0000
>
>
>
>Hi,
>
>You need to learn how to use the DOM to manipulate your XML file.
><Description/> is fine in your original XML file.
>
>Use getElementsByTagName("NOTE") to get all of your <NOTE> elements
>
>Then use something like:
>
>'<input type=text
>name=description>'+root.childNodes(x).childNodes(3).text+'</input>'
>
>Where 'x' is a variable to iterate through you <NOTE> elements, outputting
>an editable box for each description element.
>
>The put whatever the user types back into the element:
>
>root.childNodes(x).childNodes(3).text=yourForm.description.value;
>
>finally, save the new XML back to a file:
>
>  yourXmlDoc.save('yourfile.xml')
>
>
>For this to be allowed, you need to rename the .htm that instigates the
>transform to .hta
>
>This will allow the necessary permissions.
>
>I know I have been overly brief, bu if you get stuck I can give you some
>more help.
>
>cheers
>
>andrew
>
>===
>
>-----Original Message-----
>From: - - [mailto:kerroppa@hotmail.com]
>Sent: Friday, January 11, 2002 12:41 AM
>To: mc@xegesis.org; xml-dev@lists.xml.org
>Subject: Re: [xml-dev] How To Modify the Contents Of XML Document
>Dynamically?
>
>
>Thanks Mike,
>
>Say, I change <DESCRIPTION /> to <DESCRIPTION>the description goes
>here</DESCRIPTION>.   When this XML is displayed with XSL nicely, the 
>viewer
>should be allowed to change the text of <DESCRIPTION> (In this case, the
>viewer modifies from "the description goes here" to "this has been
>modified." ) so that next time the same XML is displayed, it'll show as
>"this has been modified" instead of "the description goes here"...
>
>Is this possible?
>
>Thanks,
>kero
>
>
> >From: Mike Champion <mc@xegesis.org>
> >To: - - <kerroppa@hotmail.com>
> >Subject: Re: [xml-dev] How To Modify the Contents Of XML Document
> >Dynamically?
> >Date: Thu, 10 Jan 2002 19:24:10 -0500
> >
> >I'm not sure what you mean.  DESCRIPTION is an "empty tag"
> >in your example.  That is useful if you want to assign attributes
> >to an element but not give it content.  Perhaps you want to change it to
> ><DESCRIPTION>the description goes here</DESCRIPTION>
> >
> >XML does not say anything about what is modifiable by
> >some program displaying it, that's totally up to the application.
> >
> >
> >
> >1/10/2002 7:10:48 PM, "- -" <kerroppa@hotmail.com> wrote:
> >
> > >Hi all,
> > >
> > >I'm fairly new with XML so please bare with me ;o)
> > >
> > >Let's say I have following XML:
> > >
> > >...
> > ><NOTE>
> > >  <NAME> xxx </NAME>
> > >  <DATE> ddd </DATE>
> > >  <DESCRIPTION />
> > ></NOTE>
> > >...
> > >
> > >When this is displayed in the browser using XSL, I would like to make 
>the
> > ><DESCRIPTION /> part of this XML modifiable to viewers. And also, after
> > >modifying this section, this XML should take the input and store it 
>into
> >the
> > >XML file (itself).
> > >
> > >I heard this can be done, but I just can't find the information to
> > >accomplish it.  I really appreciate any of your inputs.
> > >
> > >Thanks in advance,
> > >kero
> > >
> > >_________________________________________________________________
> > >MSN Photos is the easiest way to share and print your photos:
> > >http://photos.msn.com/support/worldwide.aspx
> > >
> > >
> > >-----------------------------------------------------------------
> > >The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> > >initiative of OASIS <http://www.oasis-open.org>
> > >
> > >The list archives are at http://lists.xml.org/archives/xml-dev/
> > >
> > >To subscribe or unsubscribe from this list use the subscription
> > >manager: <http://lists.xml.org/ob/adm.pl>
> > >
> >
> >
> >
>
>
>_________________________________________________________________
>MSN Photos is the easiest way to share and print your photos:
>http://photos.msn.com/support/worldwide.aspx
>
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://lists.xml.org/ob/adm.pl>
>
>
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://lists.xml.org/ob/adm.pl>
>


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS