|
|
@ -20,16 +20,16 @@ class AnalyzeByJSoup { |
|
|
|
private var element: Element? = null |
|
|
|
private var element: Element? = null |
|
|
|
|
|
|
|
|
|
|
|
fun parse(doc: Any): AnalyzeByJSoup { |
|
|
|
fun parse(doc: Any): AnalyzeByJSoup { |
|
|
|
if (doc is Element) { |
|
|
|
element = if (doc is Element) { |
|
|
|
element = doc |
|
|
|
doc |
|
|
|
} else if (doc is JXNode) { |
|
|
|
} else if (doc is JXNode) { |
|
|
|
if (doc.isElement) { |
|
|
|
if (doc.isElement) { |
|
|
|
element = doc.asElement() |
|
|
|
doc.asElement() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
element = Jsoup.parse(doc.value().toString()) |
|
|
|
Jsoup.parse(doc.value().toString()) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
element = Jsoup.parse(doc.toString()) |
|
|
|
Jsoup.parse(doc.toString()) |
|
|
|
} |
|
|
|
} |
|
|
|
return this |
|
|
|
return this |
|
|
|
} |
|
|
|
} |
|
|
|