• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SimpleXMLConverter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中retrofit.converter.SimpleXMLConverter的典型用法代码示例。如果您正苦于以下问题:Java SimpleXMLConverter类的具体用法?Java SimpleXMLConverter怎么用?Java SimpleXMLConverter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SimpleXMLConverter类属于retrofit.converter包,在下文中一共展示了SimpleXMLConverter类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: main

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
public static void main(String[] args) {
	RestAdapter restAdapter = new RestAdapter.Builder()
			.setServer("http://gdata.youtube.com")
			.setConverter(new SimpleXMLConverter())
			.build();
	restAdapter.setLogLevel(LogLevel.FULL);
	YouTubeDataService service = restAdapter
			.create(YouTubeDataService.class);

	if (args == null || args.length < 1) {
		usage();
		return;
	}

	String query = args[0];
	Feed result = service.search(query, "published", 1);
	System.out.printf("検索キーワード:%s\n", query);
	System.out.printf("%s件中%s件〜%s件目を表示\n", result.totalResults,
			result.startIndex,
			(result.startIndex + result.itemsPerPage - 1));
	int i = 1;
	for (Entry entry : result.entries) {
		System.out.printf("%d: %s: %s\n", i, entry.title, entry.getHtmlLocation());
		i++;
	}
}
 
开发者ID:tsuyosh,项目名称:RetrofitExamples,代码行数:27,代码来源:Main.java


示例2: CatService

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
private CatService() {
    mAsyncRestAdapter = new RestAdapter.Builder()
            .setEndpoint(API_URL)
            .setConverter(new SimpleXMLConverter())
            .setLogLevel(RestAdapter.LogLevel.FULL)
            .build();
}
 
开发者ID:ZkHaider,项目名称:CodePath-TodoApp,代码行数:8,代码来源:CatService.java


示例3: newRssService

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
private RssService newRssService() {
    final RestAdapter restAdapter = new RestAdapter.Builder()
            .setClient(new OkClient())
            .setEndpoint(this.mEndpoint)
            .setConverter(new SimpleXMLConverter())
            .build();
    return restAdapter.create(RssService.class);
}
 
开发者ID:gotokatsuya,项目名称:Easy,代码行数:9,代码来源:RssClient.java


示例4: createService

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
public static <S> S createService(Class<S> serviceClass, String baseUrl, final OAuthParameters oAuthParams) {
    OkHttpClient client = new OkHttpClient();
    client.networkInterceptors().add(new OAuthInterceptor(oAuthParams));
    builder.setClient(new OkClient(client));
    builder.setEndpoint(baseUrl).setLogLevel(RestAdapter.LogLevel.FULL);
    builder.setConverter(new SimpleXMLConverter());
    RestAdapter adapter = builder.build();
    return adapter.create(serviceClass);
}
 
开发者ID:ipragmatech,项目名称:OAuth-Magento-Rest-Api-Retrofit,代码行数:10,代码来源:ServiceGenerator.java


示例5: provideRestAdapter

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
@Provides
public RestAdapter provideRestAdapter() {
    return new RestAdapter.Builder()
            .setEndpoint("http://binamcast.ir")
            .setConverter(new SimpleXMLConverter())
            .setLogLevel(RestAdapter.LogLevel.BASIC)
            .build();
}
 
开发者ID:nekofar,项目名称:binamcast,代码行数:9,代码来源:RetrofitModule.java


示例6: getService

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
private static TVDBService getService() {

        if (service == null) {
            RestAdapter restAdapter = new RestAdapter.Builder()
                    .setConverter(new SimpleXMLConverter())
                    .setEndpoint(ApiConstants.TVDB_SERVER_URL)
                    .setLogLevel(RestAdapter.LogLevel.FULL)
                    .build();
            service = restAdapter.create(TVDBService.class);
        }
        return service;
    }
 
开发者ID:jerrellmardis,项目名称:Amphitheatre,代码行数:13,代码来源:TVDBClient.java


示例7: getEndPoint

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
public FDroidEndPoint getEndPoint() {
    return new RestAdapter.Builder()
            .setConverter(new SimpleXMLConverter())
            .setErrorHandler(new FDroidErrorHandler())
            .setEndpoint(appMarketHost)
            .setClient(new ApacheClient())
            .setLogLevel(RestAdapter.LogLevel.FULL)
            .build().create(FDroidEndPoint.class);
}
 
开发者ID:clintonhealthaccess,项目名称:chailmis-android,代码行数:10,代码来源:FDroidEndPointFactory.java


示例8: TalkClient

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
private TalkClient() {
    restAdapter = new RestAdapter.Builder()
            .setEndpoint(ApiConfig.BASE_URL)
            .setClient(new OkClient())
            .setRequestInterceptor(requestInterceptor)
            .setConverter(new GsonConverter(gson))
            .setErrorHandler(authFailedErrorHandler)
            .setLogLevel(REST_LOG_LEVEL)
            .build();

    uploadAdapter = new RestAdapter.Builder()
            .setEndpoint(ApiConfig.UPLOAD_URL)
            .setClient(new OkClient())
            .setRequestInterceptor(strikerInterceptor)
            .setLogLevel(REST_LOG_LEVEL)
            .build();

    accountAdapter = new RestAdapter.Builder()
            .setEndpoint(ApiConfig.ACCOUNT_URL)
            .setClient(new OkClient())
            .setRequestInterceptor(requestInterceptor)
            .setLogLevel(REST_LOG_LEVEL)
            .build();

    callAdapter = new RestAdapter.Builder()
            .setClient(new OkClient())
            .setEndpoint(ApiConfig.CALL_URL)
            .setConverter(new SimpleXMLConverter(new Persister(new AnnotationStrategy())))
            .setRequestInterceptor(callInterceptor)
            .setLogLevel(REST_LOG_LEVEL)
            .build();

    spiderAdapter = new RestAdapter.Builder()
            .setEndpoint(ApiConfig.SPIDER_URL)
            .setClient(new OkClient())
            .setRequestInterceptor(requestInterceptor)
            .setConverter(new GsonConverter(gson))
            .build();

    tpsAdapter = new RestAdapter.Builder()
            .setClient(new OkClient())
            .setEndpoint(ApiConfig.TPS_API)
            .setRequestInterceptor(requestInterceptor)
            .setLogLevel(REST_LOG_LEVEL)
            .build();

    tbAuthAdapter = new RestAdapter.Builder()
            .setEndpoint(ApiConfig.AUTH_SERVICE_URL)
            .setClient(new OkClient())
            .setRequestInterceptor(requestInterceptor)
            .setConverter(new GsonConverter(gson))
            .setLogLevel(REST_LOG_LEVEL)
            .build();

    deviceId = DeviceUtil.getDeviceId(MainApp.CONTEXT);
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:57,代码来源:TalkClient.java


示例9: provideConverter

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
@Provides
@Singleton
Converter provideConverter()
{
	return new SimpleXMLConverter();
}
 
开发者ID:jeksor,项目名称:justweather,代码行数:7,代码来源:NetworkModule.java


示例10: getFlickrApiConverter

import retrofit.converter.SimpleXMLConverter; //导入依赖的package包/类
private Converter getFlickrApiConverter() {
    return new SimpleXMLConverter();
}
 
开发者ID:desseim,项目名称:flickr-searcher,代码行数:4,代码来源:ApplicationModule.java



注:本文中的retrofit.converter.SimpleXMLConverter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DbgLog类代码示例发布时间:2022-05-22
下一篇:
Java TaskAttemptIdPBImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap