السلسلة الثابتة الخاصة ConvertToAbsoluteUrls (سلسلة html ، uri relativelocation) {
ihtmldocument2 doc = جديد htmldocumentClass () ؛
doc.write (كائن جديد [] {html}) ؛
Doc.Close () ؛
foreach (IHTMlanchorelement Anchor in doc.links) {
element Ihtmlelement = (ihtmlelement) مرساة ؛
string href = (string) element.getAttribute ("href" ، 2) ؛
if (href! = null) {
uri addr = uri new (relativelocation ، href) ؛
anchor.href = addr.absoluteuri ؛
}
}
foreach (ihtmlimgelement صورة في doc.images) {
IHTMLElement element = (ihtmlelement) صورة ؛
String src = (string) element.getAttribute ("SRC" ، 2) ؛
if (src! = null) {
uri addr = uri new (relativelocation ، src) ؛
Image.src = addr.absoluteuri ؛
}
}
سلسلة ret = doc.body.innerhtml ؛
العودة ret.
}