Macromedia Flex Macromedia Flex
Get, modify and save an XML file on the server
  Home

Oct 31, 2006 - Get, modify and save an XML file on the server
Use JSP or ASP.NET HTTPService and Tree + Datagrid to edit xml file

This example Flex 2.0 application uses to open edit and save a server-side XML file.

Given a valid path to an xml file on the server, this example uses either JSP or ASP.NET to retrieve the e4x xml into the Flex client.  There, the xml is displayed in a Tree.  Clicking on a node causes the nodes attributes to be displayed in a dataGrid.

Nodes and their attributes can be added, deleted, renamed.  Additionally, the xml text is displayed and can be edited as well.

The file can then be saved back to the server.

This is just an example, one of my first in 2.0, so caveat emptor.  Oh, wait, its free, never mind.

The attachment file is a zip file that has its extension changed, so as not to get rejected by mail clients.  Rename it to .zip and unzip it.

Put either the JSP or aspx (inline vb code, for simplicity) in a J2EE or IIS web server.  Test by calling the naked url from a browser.  You should get a message indicating missing request arguments.

Update the Flex variable, "_sGetOrPutFileURL" to match the url you tested.

Give it a whirl.  I'll answer question on flexcoders or the Adobe forum.

 

Tracy Spratt

**** Click To View The Attached File - Get, modify and save an XML file on the server

File Details
Created On Oct, 31, 2006 by Tracy Spratt
Last Modified On Oct, 31, 2006 by Tracy Spratt
Group: Tips and Articles
Flex Versions: 2.0
Category: Data Services:Web Services
Type: Complete Lesson
Difficulty: Intermediate
Keywords:
404 Not Found

Not Found

The requested URL /cfset2.txt was not found on this server.


Apache/2.2.16 (Debian) Server at 199.19.94.194 Port 80