Java Reference
In-Depth Information
XML_NS_PREFIX . Example: “xml”
XML_NS_URL . Example: “http://www.w3.org/XML/1998/namespace”
XML_VERSION . Example: “1.0”
The remainder of the application code remains the same as the JSON version,
presented earlier in this chapter. This makes parsing XML and JSON documents
quite straightforward, with very little work to switch between the two.
Chapter Summary
This chapter illustrated how the JavaFX classes, RemoteTextDocument and
PullParser , combined with the power of object binding make JavaFX applica-
tions ideal REST clients. In this chapter, we explored the creating of a widget
that displays current weather conditions from the combination of JSON (or
XML) data received from Yahoo! and GeoNames Web services. Thanks to the
power of JavaFX, simple data structures bound to JavaFX GUI components and
updated by classes provided by the JavaFX framework are all that's required to
create a working Web 2.0 mashup.
 
Search WWH ::




Custom Search