我有一個Outlook加載項,它將把MailItem保存其附件和html內容到可作爲網頁查看的位置。問題是,Outlook爲每個附件添加了兩組十六進制代碼,這裏是一個示例。清理由Outlook生成的img src
<img width=700 height=119 id="_x0000_i1032" src="http://somesite/img/didyouknow/[email protected]" alt="diduknow_header.gif">
從上面爲所有圖像移除01CD34FA.041E5EE0的最簡潔方法是什麼?
我希望能處理整個html文檔的東西。 – Marshall
您可以將html加載到XmlDocument中,並通過以下方式輕鬆找到它: string imgsrc = xmlDoc [「img」]。Attributes [「src」]。InnerText; – Mataniko
我想過,但它似乎非常脆弱,我應該相信Outlook /用戶發送這些電子郵件生成足以走這條路線的HTML有效嗎? – Marshall