开发者

Forms-application to display, edit and save XML. What are the possibilities?

I have to develop a forms-application with the f开发者_StackOverflow中文版ollowing specs. I have an XML file with data. I have to display this data within my application or by forms. The user must be able to view, edit, add, manipulate the data and save it to an XML file. I can't use an application/web server, it must be an offline application and the data must be displayed in a browser. What's the best way to develop my forms application? XML--> XSLT--> XHTML (forms)? Is there another better solution? Please help me.


As you mentioned XForms in your tags, it is an option. You have to use client-side rendering engine with browser. I would look into one of these:

  • XSLTForms - based on XSLT and Javascript, quite actively developed, browser agnostic.
  • Mozilla XForms Project - if you can afford being Firefox-only. Should be quite stable.
  • formsPlayer - if you can afford being IE-only. Should be stable, but not actively developed.

Beware - you could run into security restrictions with all of those. Browsers don't allow to save files into arbitrary location in your file system, even if HTML is from local file. I vaguely remember, that I successfully saved XML into local file with Mozilla XForms. I guess you have more problems with it in XSLTForms.


Saving a file locally is possible with XSLTForms with a web server: the content is sent to the server then back to the client forcing the content type so the browser will suggest to save it in a file.

Being entirely offline doesn't mean that you can't have a local web server. Apache+PHP is light, you could even have a dedicated minimal web server written in C!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜