Ejemplo n.º 1
0
        public static string Rewrite(string html, Uri baseuri)
        {
            HtmlReader              r  = new HtmlReader(html);
            StringWriter            sw = new StringWriter();
            HtmlAbsoluteLinksWriter w  = new HtmlAbsoluteLinksWriter(sw);

            w.BaseHref = baseuri;
            while (!r.EOF)
            {
                w.WriteNode(r, true);
            }
            w.Close();
            return(sw.ToString());
        }
Ejemplo n.º 2
0
 public static string Rewrite(string html, Uri baseuri)
 {
     HtmlReader r = new HtmlReader(html);
     StringWriter sw = new StringWriter();
     HtmlAbsoluteLinksWriter w = new HtmlAbsoluteLinksWriter(sw);
     w.BaseHref = baseuri;
     while (!r.EOF)
     {
         w.WriteNode(r, true);
     }
     w.Close();
     return sw.ToString();
 }