XML and Javascript

C

Chris

I was wondering if there was a way to edit an XML file with Javascript only?

Chris
 
H

Hywel Jenkins

nyk52687 said:
I was wondering if there was a way to edit an XML file with Javascript only?

Server-side yes. Client-side, you can modify it in memory for that
client. What do you really want to do?
 
C

Chris

@yahoo.com says...

Server-side yes. Client-side, you can modify it in memory for that
client. What do you really want to do?
I was looking to create somewhat of a database that allowed values to be changed, but not get into server-side code since thats too hard to find a free webhost with.

Chris
 
A

Andy Dingley

I was wondering if there was a way to edit an XML file with Javascript only?

Hopefully not.

What you're really asking here (looking at your followup) is "How do I
store persistent data from JavaScript ?" For various security
reasons, this is prevented. A few ways round it:

- cookies (very small though)

- an ActiveX control (with all sorts of drawbacks)

- server-side scripting.


In the literal meaning of your question, then XML is best manipulated
via the DOM (XML DOM, which is rather better thought out than the
HTML DOM). You'll need some sort of XML control or object that offers
such services - MSXML is the most popular (with a certain level of
M$-dependency). It's a really bad idea to try manipulating XML files
directly, as text files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top