i saw some site like this http://jyaml.sourceforge.net/ for yaml in java.
but i can't to use of that.
how can i use form yaml files?
if is it possible to use it in jav开发者_高级运维afx 2.0?
thanks.
What is YAML
You should see the Wikipedia page for YAML at least. The official YAML website defines it as
[...] a human friendly data serialization standard for all programming languages.
Use with Java
It depends on what you want to use it for - the most common use (I'd imagine, since I haven't used it myself) would be for storing application configuration, as an alternative to XML or JSON. Essentially, you'll have a simple text file that contains data in a structured format as defined by the YAML spec. Here is an article that discusses the use of YAML with Java.
To avoid reinventing the wheel, you should make use of a library that performs the serialization and deserialization for you i.e. it can read from and write to the text file and parse the data in it and hand it over to your application in an easier to use object form. The business logic, of course, must be written by you. There are several Java libraries that are available and this question on SO talks about which one to use and why: https://stackoverflow.com/questions/450399/which-java-yaml-library-should-i-use.
Yaml is a file format*, and jYaml is a Java library for working with that file format.
So you may use it to read or write information into this format.
How can i use form yaml files?
You write one, and use it with this library.
If is it possible to use it in javafx 2.0?
Can you use this library in JavaFX 2.0? If you can then yes. :)
* See comment
精彩评论