Пример #1
0
 /// <summary>
 /// Set the content of the element to the specified text.
 /// </summary>
 public static HElement Text(this HElement element, String text)
 {
     if (element != null)
     {
         element.Empty().Append(new HText(text ?? String.Empty));
     }
     return(element);
 }
Пример #2
0
 /// <summary>
 /// Set the HTML content of the element.
 /// </summary>
 public static HElement Html(this HElement element, String html)
 {
     if (element != null)
     {
         element
         .Empty()
         .Append(HSerializer.DefaultSerializer.Deserialize(new StringReader(html ?? String.Empty)).ToArray());
     }
     return(element);
 }