2014-09-17 20:51:45 +02:00
|
|
|
package de.test.antennapod.util.syndication.feedgenerator;
|
2014-03-31 19:45:03 +02:00
|
|
|
|
|
|
|
import org.xmlpull.v1.XmlSerializer;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Utility methods for FeedGenerator
|
|
|
|
*/
|
2024-04-07 23:28:14 +02:00
|
|
|
abstract class GeneratorUtil {
|
2014-05-18 00:05:07 +02:00
|
|
|
public static void addPaymentLink(XmlSerializer xml, String paymentLink, boolean withNamespace) throws IOException {
|
|
|
|
String ns = (withNamespace) ? "http://www.w3.org/2005/Atom" : null;
|
|
|
|
xml.startTag(ns, "link");
|
2014-03-31 19:45:03 +02:00
|
|
|
xml.attribute(null, "rel", "payment");
|
|
|
|
xml.attribute(null, "href", paymentLink);
|
|
|
|
xml.attribute(null, "type", "text/html");
|
2014-05-18 00:05:07 +02:00
|
|
|
xml.endTag(ns, "link");
|
2014-03-31 19:45:03 +02:00
|
|
|
}
|
|
|
|
}
|