public GetAttributeValue ( string attributeName ) : string | ||
attributeName | string | The name of the attribute |
return | string |
public void BeforeParsing(XDocument document) { var rootElement = new Element(document.Root); var existingValue = rootElement.GetAttributeValue(FakeExtensionAttrName); var newValue = this.m_Text; if (existingValue != null) { newValue = existingValue + ", " + newValue; } rootElement.AddAttribute(FakeExtensionAttrName, newValue); }
private string getHref(Element element) { string href = element.GetAttributeValue("href"); if (href == null) { Element a = element.GetFirstChildElement("a"); if (a != null) { href = a.GetAttributeValue("href"); } } return href; }