Add rss and text tags to outline when serializing opml
This commit is contained in:
parent
35d520169f
commit
1f41cb974a
@ -6,5 +6,8 @@ import org.simpleframework.xml.Root
|
||||
@Root(name = "body", strict = false)
|
||||
data class Body(@field:ElementList(inline = true, required = true) var outlines: List<Outline>?) {
|
||||
|
||||
/**
|
||||
* empty constructor required by SimpleXMl
|
||||
*/
|
||||
constructor() : this(null)
|
||||
}
|
@ -6,5 +6,8 @@ import org.simpleframework.xml.Root
|
||||
@Root(name = "head", strict = false)
|
||||
data class Head(@field:Element(required = false) var title: String?) {
|
||||
|
||||
/**
|
||||
* empty constructor required by SimpleXML
|
||||
*/
|
||||
constructor() : this(null)
|
||||
}
|
@ -11,6 +11,9 @@ data class OPML(@field:Attribute(required = true) var version: String?,
|
||||
@field:Element(required = true) var head: Head?,
|
||||
@field:Element(required = true) var body: Body?) {
|
||||
|
||||
/**
|
||||
* empty constructor required by SimpleXML
|
||||
*/
|
||||
constructor() : this(null, null, null)
|
||||
|
||||
}
|
@ -12,6 +12,9 @@ data class Outline(@field:Attribute(required = false) var title: String?,
|
||||
@field:Attribute(required = false) var htmlUrl: String?,
|
||||
@field:ElementList(inline = true, required = false) var outlines: List<Outline>?) {
|
||||
|
||||
/**
|
||||
* empty constructor required by SimpleXML
|
||||
*/
|
||||
constructor() : this(
|
||||
null,
|
||||
null,
|
||||
@ -22,5 +25,5 @@ data class Outline(@field:Attribute(required = false) var title: String?,
|
||||
|
||||
constructor(title: String) : this(title, null, null, null, null, null)
|
||||
|
||||
constructor(title: String, xmlUrl: String, htmlUrl: String) : this(title, null, null, xmlUrl, htmlUrl, null)
|
||||
constructor(title: String, xmlUrl: String, htmlUrl: String) : this(title, title, "rss", xmlUrl, htmlUrl, null)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user