Use a live XML data source
An XML data source can be a local XML file or an XML file on a remote web server.
For an example of using a remote XML file, see Try it: Create an RSS news reader in Blend.
To add an XML data source
In the Data panel, click Create data source , and then click Define New XML Data Source.
The Define New XML Data Source dialog box appears.
Conseil You can also add an XML data source by dragging a source from File Explorer or from the Projects panel onto the Data panel.
Do one of the following:
To use a local XML file, click the Browse button next to the URL for XML Data text box, browse to the XML file that you want to use, and then click Open.
[!REMARQUE]
If you are using a local XML file, we recommend that you add the XML file to your project so that the file will be built into the application. This makes sure that your application will work when you deploy it. Alternatively, you can deploy the application and the XML file together, as long as the path of the XML file remains the same.
To use a live XML file on the web, type the URL in the URL for XML Data text box. For example, type http://rss.msnbc.msn.com/id/13282720/device/rss/rss.xml for the RSS feed of Wonderful World news on MSNBC.
Next to Data source name, type a descriptive name.
Under Create data source in, select one of the following:
To make the data available to all documents in your application, select Project.
To make the data available only to the current document, select This document.
Click OK.
The Data section of the Project panel is now populated with the data that is parsed from the XML file. The data type for each node in the data source is listed in parentheses.
You can now bind objects in your project to the XML data by dragging items of data from the Data panel to the artboard or to an existing object.
For more information, see Bind an object to data.