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
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.