?
Solved

Javascript to create XML files

Posted on 2001-09-04
6
Medium Priority
?
999 Views
Last Modified: 2008-02-01
Can anyone please tell me how to create XML files using Javascript?
If this possible?
0
Comment
Question by:desmondtsk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 4

Expert Comment

by:chabaud
ID: 6453853
You can simply the XML DOM (with ie5).

Here is a good introduction:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xmconintroductiontothedom.asp

If you problem is to create a (xml) file on disk, you would have security constraints.
0
 

Accepted Solution

by:
devenkhatri earned 200 total points
ID: 6456441
to create xml file on the disk , first make a vbscript function which will use FileSystemObject object of vbscript
and then call that function in javascript
filesystemobject is the object of vbscript which will create the file on your disk , and in javascript u just traverse through the structure and write the nodes onto the file
0
 
LVL 2

Expert Comment

by:gvpathi_dev
ID: 6538407
Any way it gives a warning that shows running ActiveXobjects unsafe.  and another prob is VB Script not able to run in NS.  Is there is any other solution?...

I created a ActiveX DLL but with which the same problem persist..

A VC guy told that inherit ISafe.. to open that in scripting... but if we implement it we cannot save that object in local...(File system object deney...)  MS DOM itself come with a API called "Save" but it won't work in scripts...(From VB it works fine)




0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:rdov
ID: 6560456
for Cross Platform XML Parsing in JavaScript try this:
http://xmljs.sourceforge.net/
0
 
LVL 2

Expert Comment

by:gvpathi_dev
ID: 6562734
rdov,
This is not the requirement.  He want the string to be stored into client machine?  Is it correct desmondtsk
?
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6617557
Finalized by:
Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question