Files
android_development/samples/XmlAdapters/res/xml/rss_feed.xml
Gilles Debunne 3fc9318ce5 Made XmlAdapter sample a standalone application.
Change-Id: If34f2086da65f81968f630a42e4b9e725cb65efe
2011-01-07 08:38:50 -08:00

31 lines
1.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<cursor-adapter xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.example.android.xmladapters"
app:selection="/rss/channel/item"
app:layout="@layout/rss_feed_item">
<bind app:from="/title" app:to="@id/title" app:as="string" />
<bind app:from="/media:content@url" app:to="@id/image" app:as="com.example.android.xmladapters.UrlImageBinder"/>
<bind app:from="/media:description" app:to="@id/description" app:as="string" />
<bind app:from="/guid" app:to="@id/item_layout" app:as="tag" />
<bind app:from="/pubDate" app:to="@id/date" app:as="string">
<transform app:withExpression="Published on {/pubDate}." />
</bind>
</cursor-adapter>