通过调用web service 返回reponse xml的格式如下
<?xml version="1.0" encoding="utf-8"?><soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetMusicListResponse xmlns="http://tempuri.org/"> <GetMusicListResult> <ResponseCode>string</ResponseCode> <RecordCount>int</RecordCount> <PageCount>int</PageCount> <Musics> <MusicTo> <MusicID>long</MusicID> <Title>string</Title> <Artist>string</Artist> <Genre>string</Genre> <Released>string</Released> <Label>string</Label> <PlayTime>string</PlayTime> <FileSize>string</FileSize> </MusicTo> <MusicTo> <MusicID>long</MusicID> <Title>string</Title> <Artist>string</Artist> <Genre>string</Genre> <Released>string</Released> <Label>string</Label> <PlayTime>string</PlayTime> <FileSize>string</FileSize> </MusicTo> </Musics> </GetMusicListResult> </GetMusicListResponse> </soap12:Body></soap12:Envelope>请问一下,如果我要讲数据按照一条一条的格式插入数据库中
是否要一定要用程序一项一项的去分析这个返回的xml呢,还是有更好的方法啊。谢谢
<?xml version="1.0" encoding="utf-8"?><soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetMusicListResponse xmlns="http://tempuri.org/"> <GetMusicListResult> <ResponseCode>string</ResponseCode> <RecordCount>int</RecordCount> <PageCount>int</PageCount> <Musics> <MusicTo> <MusicID>long</MusicID> <Title>string</Title> <Artist>string</Artist> <Genre>string</Genre> <Released>string</Released> <Label>string</Label> <PlayTime>string</PlayTime> <FileSize>string</FileSize> </MusicTo> <MusicTo> <MusicID>long</MusicID> <Title>string</Title> <Artist>string</Artist> <Genre>string</Genre> <Released>string</Released> <Label>string</Label> <PlayTime>string</PlayTime> <FileSize>string</FileSize> </MusicTo> </Musics> </GetMusicListResult> </GetMusicListResponse> </soap12:Body></soap12:Envelope>请问一下,如果我要讲数据按照一条一条的格式插入数据库中
是否要一定要用程序一项一项的去分析这个返回的xml呢,还是有更好的方法啊。谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货