Using the generated DataBeans  Getting the IngredientList from the Recipe

Chapter 2: Understanding the DataBean Framework

Constructing instances of classes from an XML document

The following example illustrates constructing instances of Recipe classes from an XML document. In this example, false means there is no validation against a DTD document.

FileInputStream fiStream = new FileInputStream    xmlFileName);

Recipe iRecipe = new Recipe(fiStream, false);

or

FileInputStream fiStream = new FileInputStream    xmlFileName);

Recipe iRecipe = new Recipe();

iRecipe.deserializeXML(fiStream, false);





Copyright © 2005. Sybase Inc. All rights reserved. Getting the IngredientList from the Recipe

View this book as PDF