本文整理汇总了Java中com.androidquery.util.XmlDom类的典型用法代码示例。如果您正苦于以下问题:Java XmlDom类的具体用法?Java XmlDom怎么用?Java XmlDom使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlDom类属于com.androidquery.util包,在下文中一共展示了XmlDom类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.androidquery.util.XmlDom; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recyler);
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
// 创建一个线性布局管理器
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
layoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
// 设置布局管理器
recyclerView.setLayoutManager(layoutManager);
adapter = new XRecylerAdapter<Vlist>(VlistViewHolder.class, null);
recyclerView.setAdapter(adapter);
recyclerView.setOnScrollListener(adapter.getOnScrollListener(null));
getHttp().get(50, "http://cache.video.iqiyi.com/jp/avlist/202861101/",
this);
try {
String str = "<RequestData><HeadData><UserCode>sh1_admin</UserCode><UserName>sh1_admin</UserName><UserCompanyCode>3107</UserCompanyCode><UserCompanyName>上海分公司一部</UserCompanyName><RequestType>03</RequestType></HeadData><BodyData><ReportId>113100000033</ReportId><Insurant>a5rfg87</Insurant><NumberPlate>沪E78612</NumberPlate><EngineModel></EngineModel><CarVin></CarVin><AccidentDate>2011-02-25 15:07:00</AccidentDate><ReportDate>2011-02-25 15:07:00</ReportDate><Province>310000</Province><City>310100</City><District></District><AccidentPlace>1</AccidentPlace><AccidentLongitude></AccidentLongitude><AccidentLatitude></AccidentLatitude><SurveyLongitude></SurveyLongitude><SurveyLatitude></SurveyLatitude><SceneReportFlag></SceneReportFlag><Reporter></Reporter><ReporterTel></ReporterTel><SurveyPlace></SurveyPlace><OperatorId>3525</OperatorId><OperatorName>sh_admin</OperatorName><ReportDealId>30000800</ReportDealId><ReportDealName>江苏分公司</ReportDealName><CompanyName></CompanyName><CustomerTypeCode></CustomerTypeCode><ForcePolicyId>a5rfg87a5rfg87a5rfg87</ForcePolicyId><BizPolicyId></BizPolicyId><Index>0</Index><FieldName>5</FieldName></BodyData></RequestData>";
XmlDom dom = new XmlDom(str);
dom.tag("UserCode").text();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
开发者ID:comcp,项目名称:android-Stupid-Adapter,代码行数:29,代码来源:RecylerActivity.java
示例2: parse_aq
import com.androidquery.util.XmlDom; //导入依赖的package包/类
public List<class_rss_item> parse_aq(String rssFeed) {
final List<class_rss_item> list = new ArrayList<class_rss_item>();
try {
aq.ajax(rssFeed, XmlDom.class, new AjaxCallback<XmlDom>() {
@Override
public void callback(String url, XmlDom xml, AjaxStatus status) {
List<XmlDom> entries = xml.tags(ITEM);
//List<class_rss_item> list = new ArrayList<class_rss_item>();
class_rss_item item;
for (XmlDom entry : entries) {
item = new class_rss_item();
Log.d("RSS Attribute", LINK);
item.setLink(entry.text(LINK).trim());
Log.d("RSS Attribute", DESCRIPTION);
item.setDescription(entry.text(DESCRIPTION).trim());
Log.d("RSS Attribute", PUB_DATE);
item.setPubDate(entry.text(PUB_DATE).trim());
Log.d("RSS Attribute", TITLE);
item.setTitle(entry.text(TITLE).trim());
Log.d("RSS Attribute", GUID);
item.setguid(entry.text(GUID).trim());
Log.d("RSS Added", item.toString());
list.add(item);
}
}
});
} catch (Exception e) {
funct.send_bug_report(e);
}
return list;
}
开发者ID:Dimoshka,项目名称:JWP,代码行数:34,代码来源:class_rss_provider.java
示例3: isStreamingContent
import com.androidquery.util.XmlDom; //导入依赖的package包/类
protected boolean isStreamingContent()
{
return File.class.equals(type) || XmlPullParser.class.equals(type) || InputStream.class.equals(type) || XmlDom.class.equals(type);
}
开发者ID:libit,项目名称:lr_dialer,代码行数:5,代码来源:AbstractAjaxCallback.java
示例4: isStreamingContent
import com.androidquery.util.XmlDom; //导入依赖的package包/类
protected boolean isStreamingContent() {
return File.class.equals(type) || XmlPullParser.class.equals(type) || InputStream.class.equals(type) || XmlDom.class.equals(type);
}
开发者ID:bblue000,项目名称:ExoPlayerDemo,代码行数:4,代码来源:AbstractAjaxCallback.java
示例5: request
import com.androidquery.util.XmlDom; //导入依赖的package包/类
public void request(String url) {
aq.ajax(url, XmlDom.class,this,"onRequest");
swipeRefreshLayout.setRefreshing(true);
}
开发者ID:recoilme,项目名称:itnews,代码行数:5,代码来源:ActivityMain.java
示例6: getSyncWithDevice
import com.androidquery.util.XmlDom; //导入依赖的package包/类
/**
* A jump point to processXML
*
* @param remote_device_id
*/
public void getSyncWithDevice(String remote_device_id) {
aq.id(R.id.sub_status).text(remote_device_id);
String url = "http://ttbackend2.appspot.com/ttbackend2?a=query&d=" + remote_device_id;
aq.ajax(url, XmlDom.class, this, "processXML");
}
开发者ID:rgoodie,项目名称:TerpTools2,代码行数:11,代码来源:Subscribe.java
示例7: processXML
import com.androidquery.util.XmlDom; //导入依赖的package包/类
public void processXML(String url, XmlDom xml, AjaxStatus status) {
List<XmlDom> items = xml.tags("device");
for (XmlDom entry : items) {
aq.id(R.id.sub_status).text(entry.toString());
remote_counter = Long.parseLong(entry.attr("counter"));
remote_system_clock = Long.parseLong(entry.attr("system_time"));
Long diff_system_clocks = Calendar.getInstance().getTimeInMillis() - remote_system_clock;
Long reset_pause_point = remote_counter - diff_system_clocks;
Log.d(TAG, "remote_system_clock" + entry.attr("system_time"));
Log.d(TAG, "diff_system_clocks" + Long.toString(diff_system_clocks));
Log.d(TAG, "reset_pause_point" + Long.toString(reset_pause_point));
timerStart(reset_pause_point);
}
}
开发者ID:rgoodie,项目名称:TerpTools2,代码行数:22,代码来源:Subscribe.java
注:本文中的com.androidquery.util.XmlDom类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论