All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taobao.api.internal.parser.xml.ObjectXmlParser Maven / Gradle / Ivy

The newest version!
package com.taobao.api.internal.parser.xml;

import com.taobao.api.ApiException;
import com.taobao.api.TaobaoParser;
import com.taobao.api.internal.mapping.Converter;

/**
 * 单个JSON对象解释器。
 * 
 * @author carver.gu
 * @since 1.0, Apr 11, 2010
 */
public class ObjectXmlParser implements TaobaoParser {

	private Class clazz;

	public ObjectXmlParser(Class clazz) {
		this.clazz = clazz;
	}

	public T parse(String rsp, String responseType) throws ApiException {
		Converter converter = new XmlConverter(responseType);
		return converter.toResponse(rsp, clazz);
	}

	public Class getResponseClass() {
		return clazz;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy