Click here to Skip to main content
12,623,027 members (29,110 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# Javascript XML
Hi friends,

How do i create new xml file and also modify any xml file means add more nodes in xml file using javascript.?

Thanks in advance...
Posted 30-Jan-11 18:49pm
Updated 31-Jan-11 1:08am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Are you asking about Creating XML File in client-side? If yes, then you cannot.

If you want to maintain XML object in memory then you can use XmlHttpRequest[^] object.
venkatrao palepu 31-Jan-11 1:08am
Hi Venkatesh,

i want to Create XML file dynamically in Client Side...

if u know please help me..
Venkatesh Mookkan 31-Jan-11 1:19am
You cannot create XML file (any file) from the Client-Side. If you still want to create, then you have to use ActiveXObject as @Sandeep said.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Not sure on what's the issue in forming an XML. All you need is to form a custom XML of yours making sure that you have all the matching open-close tags.

In case you are looking at creating XML file from client side on server side then you can have a look at this option: XML Javascript[^]
It is done using an ActiveXObject.

Or else, just form the XML using a your own defined structure and use it. Try!
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

You can see this

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 31 Jan 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100