mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
refactor(ContextBlock): return dom nodes directly
This commit is contained in:
@@ -22,7 +22,7 @@ abstract class ContextBlock {
|
||||
SUPPLY
|
||||
}
|
||||
|
||||
fun encodeToXml(): String {
|
||||
fun encodeToXml(): Element {
|
||||
val document = DocumentBuilderFactory.newInstance()
|
||||
.newDocumentBuilder()
|
||||
.newDocument()
|
||||
@@ -33,7 +33,7 @@ abstract class ContextBlock {
|
||||
|
||||
fillXml(document, root)
|
||||
|
||||
return document.toXmlString()
|
||||
return root
|
||||
}
|
||||
|
||||
protected abstract fun fillXml(document: Document, root: Element)
|
||||
|
||||
Reference in New Issue
Block a user