我使用replaceWith来替换图片,只使用它们的源。下面是我使用的代码
var html = 'Hello<div><br></div><img src="abc.png" class="img-responsive" style="width: 100%;"><div><br></div><div>Video</div><div><br></div><div><br>
使用Kanna导入,我目前正在使用以下代码解析html:
if let doc = Kanna.HTML(url: NSURL(string: "https://en.wikipedia.org/wiki/Data")!, encoding: NSUTF8StringEncoding) {
// Search for nodes by XPath
for link in doc.xpath("/html/head...") {
primaryDisplay.text!=link.text!
Sub 文字识别()
strPicPath = Application.GetOpenFilename(, , "打开图片") '打开文件
EncodeFile (strPicPath)
End Sub
Public Function EncodeFile(strPicPath As String) As String
Const adTypeBinary = 1
Dim objXML
Dim objDocElem
Dim objStream
Set objStream = CreateObj