Flex vs. NET Interop (iv): Using Httpservice, Urlreqeust, and urlloader load/transfer numbers
In the first two articles, the knowledge of data interaction between flex and. NET WebService is described separately, and this article describes another way to load data and initiate a request. The data load request classes provided in ActionScript 3.0 are primarily Httpservice,urlloader and urlrequest, which enable them to work together to complete data loading and requests. Let me take a look at how these three classes are going to do the data loading work.
The following XML file is defined on the local IIS server:
1 <?xml version="1.0" encoding="utf-8" ?>
2 <Root>
3 <Book>
4 <Id>1</Id>
5 <Name>《三国演义》</Name>
6 <Author>罗贯中</Author>
7 <Price>52.30</Price>
8 </Book>
9 <Book>
10 <Id>2</Id>
11 <Name>《西游记》</Name>
12 <Author>吴承恩</Author>
13 <Price>39.91</Price>
14 </Book>
15 <Book>
16 <Id>3</Id>
17 <Name>《红楼梦》</Name>
18 <Author>曹雪芹</Author>
19 <Price>48.20</Price>
20 </Book>
21 <Book>
22 <Id>4</Id>
23 <Name>《水浒传》</Name>
24 <Author>施耐庵</Author>
25 <Price>39.85</Price>
26 </Book>
27 </Root>