-1

我正在开发一个 JavaFX 2.0 应用程序,我想按深度保存一个网站及其内容,但我不知道该怎么做。例如,如果我想要深度 0,它将保存第一个 html 页面。如果深度为 1,我将保存网站的第一个 html 页面及其所有子页面及其内容!我不知道该怎么做。

我有这个项目作为家庭作业。我是一个学生!

任何人都可以在这里帮助我吗?我会很高兴的。

非常感谢!

4

1 回答 1

3

I'm not sure that JavaFX has some special API for this task. The main idea of javaFX may be defined as "tool for builing really cool GUI", but not like "some special tool for some specific tasks on web". Maybe WebView component can help you with your task (as its purpose is working with web). If not - you should work with javaFX on this task just the same way you'll walk with some other framework on it: write your own parser for HTML pages (read a website as a string, parse it for finding all html tags... and so on... XPath can help you there), or find some already existing libraries and use them in your application. So, javaFX can help you in this project as a framework for building GUI, but business logic must be done by some other frameworks.

于 2012-04-25T13:12:07.760 回答