TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jayaprakash R
NA
10
0
Using Javascript to save an xml file
Jul 21 2010 1:25 AM
Hi all,
I want to save an xml file using javascript. and also is it possible to access the local file sytem using javascript.
Here I am just trying to delete a node from xml file and save the xml file.
function deleteNode() {
var xmlDoc;
var txt;
var nodes;
var c;
var parents;
xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
xmlDoc.load("wkflow.xml")
nodes = xmlDoc.getElementsByTagName("Activity");
for (i = 0; i < nodes.length; i++)
{
txt = xmlDoc.getElementsByTagName("Activity")[i].getAttribute("ID");
c =xmlDoc.getElementsByTagName("Activity")[i];
if (txt == outsideFunction.pid) {
c.parentNode.removeChlid(c);
xmlDoc.save("C:\\Temp\\wkflow.xml"); ---here was the problem
or
xmlDoc.save("wkflow.xml");--- here was the problem
}
Xml- sample
<act>
<Activity id=10>x</Activity>
<Activity id=10>x</Activity>
</act>
Reply
Answers (
1
)
Which Points Must Be Remember in WEB TESTING.
How to set the position of scrollbar at the bottom of div using CSS2.0?