Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating XML in ColdFusion

Status
Not open for further replies.

WildWest

Programmer
Apr 2, 2002
111
0
0
US
I have my customer updating an XML file and I want to build an Admin interface for him to revise the contents of the XML file. Because I can't use a Datasource name to host the information in a database I am using an XML file. Is there an easy way to have CF read the contents of an XML file, present it to the user on a form and have him update the form back to the XML file?

The XML looks like:

<broadcast>
<menu>
<about_text>Hello World<about_text>
<about_link></menu>
</broadcast>
 
could you not simply present the user with a form with all the fields and then add the submitted values to your xml document? Is the xml document complicated? Allowing the user to edit XML inline sounds error prone - what happens if the document is invalid?

Another option would be to simply allow the user to user an editor to edit the document (perhaps using an xml editor like the free version of xmlSpy) they could then upload the document which you could validate before writing it to disk or replacing the existing document.

Finally another option would be to use an inline text editor such as FCKeditor.
 
I can't use a Datasource name to host the information in a database

why not?

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top