首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

小弟我接到一个xml数据。小弟我如何把他显在网页上

2012-01-09 
我接到一个xml数据。我怎么把他显在网页上?xmlversion 1.0 encoding GB2312 ?-OTResponse-Error

我接到一个xml数据。我怎么把他显在网页上
<?xml   version= "1.0 "   encoding= "GB2312 "   ?>  
-   <OTResponse>
-   <ErrorInfo>
    <Code> 20000 </Code>  
    <Description> 查询酒店成功 </Description>  
    </ErrorInfo>
    <TransactionName> SimpleHotelSearch </TransactionName>  
-   <Data>
-   <SimpleHotelsInfo>
    <HotelNumber> 177 </HotelNumber>  
-   <HotelList>
-   <PropertyLineItem>
    <PropertyID> 1E2UQ </PropertyID>  
    <Address> 上海   徐汇区   漕溪北路1200号 </Address>  
    <Promotion> 0A3 </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 5 </Rank>  
    <Name> 华亭宾馆 </Name>  
    <TEL> 021-64396000 </TEL>  
    <FAX   />  
    </PropertyLineItem>
+   <PropertyLineItem>
    <PropertyID> 1E2Q9 </PropertyID>  
    <Address> 上海   闸北区   中山北路1009号 </Address>  
    <Promotion> 0B2 </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 3 </Rank>  
    <Name> 宝隆居家旅店(中山店) </Name>  
    <TEL> 021-56095511 </TEL>  
    <FAX   />  
    </PropertyLineItem>
+   <PropertyLineItem>
    <PropertyID> 1E2QK </PropertyID>  
    <Address> 上海   黄浦区   延安东路7号(近外滩) </Address>  
    <Promotion> 0B3 </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 3A </Rank>  
    <Name> 上海嘉娜宾馆 </Name>  
    <TEL> 021-63300022 </TEL>  
    <FAX   />  
    </PropertyLineItem>
+   <PropertyLineItem>
    <PropertyID> 1E4MY </PropertyID>  
    <Address> 黄浦区滇池路81-85号 </Address>  
    <Promotion> 0B4 </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 4A </Rank>  
    <Name> 上海曼哈顿外滩商务酒店 </Name>  
    <TEL> 021-68888123 </TEL>  
    <FAX   />  
    </PropertyLineItem>
+   <PropertyLineItem>
    <PropertyID> 1E2O0 </PropertyID>  
    <Address> 上海   黄浦区   延安东路128弄8号 </Address>  
    <Promotion> 0B5 </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 3A </Rank>  
    <Name> 创业大酒店 </Name>  
    <TEL> 021-63235188 </TEL>  
    <FAX   />  
    </PropertyLineItem>
+   <PropertyLineItem>
    <PropertyID> 1E2RQ </PropertyID>  


    <Address> 上海   静安区   北京西路1700号 </Address>  
    <Promotion> 0EC </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 3 </Rank>  
    <Name> 云峰大饭店 </Name>  
    <TEL> 021-62550500 </TEL>  
    <FAX   />  
    </PropertyLineItem>
+   <PropertyLineItem>
    <PropertyID> 1E2QQ </PropertyID>  
    <Address> 浦东新区川沙路5007号 </Address>  
    <Promotion> 0ED </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 3A </Rank>  
    <Name> 锦丽华大酒店 </Name>  
    <TEL> 021-58923700 </TEL>  
    <FAX   />  
    </PropertyLineItem>
+   <PropertyLineItem>
    <PropertyID> 1E2Q5 </PropertyID>  
    <Address> 上海   长宁区   中山西路750号 </Address>  
    <Promotion> 0EH </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 3 </Rank>  
    <Name> 上服假日大酒店(虹桥店) </Name>  
    <TEL> 021-62296060 </TEL>  
    <FAX   />  
    </PropertyLineItem>
+   <PropertyLineItem>
    <PropertyID> 1E2R4 </PropertyID>  
    <Address> 上海   浦东新区   浦东大道2998号 </Address>  
    <Promotion> 1EB </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 3 </Rank>  
    <Name> 上海高桥石化宾馆 </Name>  
    <TEL> 021-58712633 </TEL>  
    <FAX   />  
    </PropertyLineItem>
+   <PropertyLineItem>
    <PropertyID> 1E2LM </PropertyID>  
    <Address> 上海   黄浦区   制造局路789号 </Address>  
    <Promotion> 1ED </Promotion>  
    <CityCode> SHA </CityCode>  
    <Rank> 2 </Rank>  
    <Name> 黄金岛大酒店 </Name>  
    <TEL> 021-63157789 </TEL>  
    <FAX   />  
    </PropertyLineItem>
    </HotelList>
    </SimpleHotelsInfo>
    </Data>
    </OTResponse>


这是我接到的xml查询酒店的数据。我想全部显在网页上面怎么绑定呀

[解决办法]
xml+xls
或者xml+dataset
[解决办法]
你可以配合xls
或者一条条读出来
[解决办法]
放到dataset里 绑定就行了
[解决办法]
xml+xls转换成HTML或者直接用xml控件

热点排行