In Lesson 15 you learned how to consume XML from a web service and bind it to elements in your application. If you want the user to be able to use your application when networking is not available, such as when the user is on an airplane, you will want to provide a means of populating the data from a local data file.
You could have your application pull down a copy of the most current version of the data file when the user is connected to the Internet and store the data as an XML file in the program's isolated storage. This will serve as the source of data when an Internet connection is unavailable. You could include a base version of the XML file with your application for use until the XML file is updated.
If you are building an e-commerce application and want to include a default set of products with the application, you can include an XML file such as the following:
<JHProducts> <Product> <ProductID>7000</ProductID> <ProductCode>EV100-11</ProductCode> <ProductType>Anniversary</ProductType> <ProductIntroductionDate>All Year </ProductIntroductionDate> <ProductName>The Perfect Dozen</ProductName> <ProductDescription>A dozen red roses are always perfect, always savored. We add even more charming beauty with seeded eucalyptus and spiral eucalyptus. Item number EV 100-11.</ProductDescription> <ProductImageURL>EV100-11.jpg</ProductImageURL> <ProductImageURLlarge>EV100-11.jpg</ProductImageURLlarge> <UnitPrice>$60.00</UnitPrice> ...