I am studying computer science and we have to do a programming project which must be strongly related to XML and using XSD and XSLT or XQuery/XPath at least. Because I like C# I'd like to do it in this language, but I could use another if anyone has another idea.
我正在学习计算机科学,我们必须做一个编程项目,它必须与XML密切相关,至少使用XSD和XSLT或XQuery / XPath。因为我喜欢C#,我想用这种语言来做,但如果有人有另一个想法,我可以使用另一种语言。
My Idea is now to code some kind of appointment book. I imagine that all appointments for the week are shown as HTML and you can enter for each day appointment notes in the textarea for this day.
我的想法现在是编写某种预约书。我想这一周的所有约会都显示为HTML,您可以在今天的textarea中输入每天的约会记录。
Now my question: How can I take over the data entered in the textboxes? The application is an offline one so I have no web server receiving the GET request containing the entered data. Is it possible to read the current HTML DOM from memory with all its entered values and then transform it to an XML format for persistent storage from which it could be read in later?
现在我的问题是:我如何接管在文本框中输入的数据?该应用程序是脱机应用程序,因此我没有Web服务器接收包含输入数据的GET请求。是否有可能从内存中读取当前的HTML DOM及其所有输入的值,然后将其转换为XML格式以便持久存储,以后可以从中读取它?
Or is this idea totally stupid?
或者这个想法完全是愚蠢的?
How else can I put all those XML technologies in one app?
我还能将所有这些XML技术放在一个应用程序中吗?
5 个解决方案
#1
If you want to show UI Generation from XSLT, the web page approach is easiest.
如果要从XSLT显示UI生成,则网页方法最简单。
More impressive is generation of XAML from XSLT -> windows app (WPF).
更令人印象深刻的是XSLT的一代XAML - > windows app(WPF)。
Download Visual Web Developer (FREE) or Visual C#
下载Visual Web Developer(免费)或Visual C#
#2
Why does it have to be Web based?
为什么它必须基于Web?
You can use those technologies in a Windows Application.
您可以在Windows应用程序中使用这些技术。
#3
You can use JavaScript. Convert the data into XML or JSON and output it to another element, like div, or textarea. What you need to do is set a function that does all this and gets executed on submit.
你可以使用JavaScript。将数据转换为XML或JSON并将其输出到另一个元素,如div或textarea。你需要做的是设置一个完成所有这一切的功能,并在提交时执行。
Check this example. Also to speed things up, you can use a library like jQuery.
检查此示例。另外,为了加快速度,您可以使用像jQuery这样的库。
#4
Being at home and offline do not mean you don't have a Web server. There are zillions of ready-made packages which offer an embedded HTTP server so that the same application can run online and offline without any modification. Very convenient.
在家和离线并不意味着您没有Web服务器。有数以万计的现成包提供嵌入式HTTP服务器,因此相同的应用程序可以在线和离线运行而无需任何修改。很方便。
(I know you us C# but, just to show an example, I use wsgiref.simple_server for that purpose.)
(我知道你们是C#但是,为了展示一个例子,我为此目的使用了wsgiref.simple_server。)
#5
Why not make a windows app that allows the user to update the appointments which are stored in an XML file. Then use a stylesheet to display the appointments in a web browser.
为什么不制作一个允许用户更新存储在XML文件中的约会的Windows应用程序。然后使用样式表在Web浏览器中显示约会。
#1
If you want to show UI Generation from XSLT, the web page approach is easiest.
如果要从XSLT显示UI生成,则网页方法最简单。
More impressive is generation of XAML from XSLT -> windows app (WPF).
更令人印象深刻的是XSLT的一代XAML - > windows app(WPF)。
Download Visual Web Developer (FREE) or Visual C#
下载Visual Web Developer(免费)或Visual C#
#2
Why does it have to be Web based?
为什么它必须基于Web?
You can use those technologies in a Windows Application.
您可以在Windows应用程序中使用这些技术。
#3
You can use JavaScript. Convert the data into XML or JSON and output it to another element, like div, or textarea. What you need to do is set a function that does all this and gets executed on submit.
你可以使用JavaScript。将数据转换为XML或JSON并将其输出到另一个元素,如div或textarea。你需要做的是设置一个完成所有这一切的功能,并在提交时执行。
Check this example. Also to speed things up, you can use a library like jQuery.
检查此示例。另外,为了加快速度,您可以使用像jQuery这样的库。
#4
Being at home and offline do not mean you don't have a Web server. There are zillions of ready-made packages which offer an embedded HTTP server so that the same application can run online and offline without any modification. Very convenient.
在家和离线并不意味着您没有Web服务器。有数以万计的现成包提供嵌入式HTTP服务器,因此相同的应用程序可以在线和离线运行而无需任何修改。很方便。
(I know you us C# but, just to show an example, I use wsgiref.simple_server for that purpose.)
(我知道你们是C#但是,为了展示一个例子,我为此目的使用了wsgiref.simple_server。)
#5
Why not make a windows app that allows the user to update the appointments which are stored in an XML file. Then use a stylesheet to display the appointments in a web browser.
为什么不制作一个允许用户更新存储在XML文件中的约会的Windows应用程序。然后使用样式表在Web浏览器中显示约会。