I am creating a link element for my HTML files created by Aspose HTML. I need to have a closing tag added to the newly-created link element. By default, there is no closing tag added. How can I add the closing tag?
using (var document = new HTMLDocument(inputfile.ReadToEnd(), "."))
{
inputfile.Dispose();
// set up the html header
var head = document.GetElementsByTagName("head").FirstOrDefault();
var csslink1 = document.CreateElement("link");
var csslink2 = document.CreateElement("link");
csslink1.SetAttribute("rel", "stylesheet");
csslink1.SetAttribute("type", "text/css");
csslink1.SetAttribute("src", "emccustom.css");
csslink2.SetAttribute("rel", "stylesheet");
csslink2.SetAttribute("type", "text/css");
csslink2.SetAttribute("src", "commonltr-emc.css");
head.AppendChild(csslink1);
head.AppendChild(csslink2);
@david.irons
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): HTMLNET-5298
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
According to the HTML 5 specification (HTML Standard) the LINK element does not have a closing tag, so it is not created. For other elements, which must have closing tag according to specification, it is created automatically.
Yes, I discovered that fact regarding the specification. I figured you must stick with that standard. I will work around the issue that I have. Thank you for your response.
The issues you have found earlier (filed as HTMLNET-5298) have been fixed in this update. This message was posted using Bugs notification tool by avpavlysh