111 references to XmlElement
Microsoft.Build (111)
Construction\ProjectElement.cs (27)
75/// If this is true, then the <see cref="XmlElement"/> will still be used to hold the data for this (pseudo) ProjectElement, but 183public string OuterElement => Link != null ? Link.OuterElement : XmlElement.OuterXml; 294public ElementLocation Location => Link != null ? Link.Location : XmlElement.Location; 297public string ElementName => Link != null ? Link.ElementName : XmlElement.Name; 334return (XmlDocumentWithLocation)XmlElement?.OwnerDocument; 368XmlElement.RemoveAllAttributes(); 369if (XmlElement.ChildNodes.Count == 1 && XmlElement.FirstChild.NodeType == XmlNodeType.Text) 371XmlElement.RemoveChild(XmlElement.FirstChild); 375ReplaceElement(XmlUtilities.RenameXmlElement(XmlElement, element.ElementName, XmlElement.NamespaceURI)); 384XmlElement.SetAttribute(remoteAttribute.LocalName, remoteAttribute.NamespaceURI, remoteAttribute.Value); 390XmlElement.AppendChild(XmlElement.OwnerDocument.CreateTextNode(pureText)); 398foreach (XmlAttribute attribute in element.XmlElement.Attributes) 402XmlElement.SetAttribute(attribute.LocalName, attribute.NamespaceURI, attribute.Value); 407if (element.XmlElement.ChildNodes.Count == 1 && element.XmlElement.FirstChild.NodeType == XmlNodeType.Text) 409XmlElement.AppendChild(XmlElement.OwnerDocument.CreateTextNode(element.XmlElement.FirstChild.Value)); 461if (ReferenceEquals(newElement, XmlElement)) 536return Link != null ? Link.GetAttributeLocation(attributeName) : XmlElement.GetAttributeLocation(attributeName); 542ProjectXmlUtilities.GetAttributeValue(XmlElement, attributeName, nullIfNotExists); 583ProjectXmlUtilities.SetOrRemoveAttribute(XmlElement, name, value); 599ProjectXmlUtilities.SetOrRemoveAttribute(XmlElement, name, value);
Construction\ProjectElementContainer.cs (41)
447string value = Internal.Utilities.GetXmlNodeInnerContents(child.XmlElement); 448ProjectXmlUtilities.SetOrRemoveAttribute(XmlElement, child.XmlElement.Name, value); 463XmlElement.RemoveAttribute(oldName); 502ProjectErrorUtilities.VerifyThrowInvalidProject(!XmlElement.HasAttribute(child.XmlElement.Name), 503XmlElement.Location, "InvalidChildElementDueToDuplication", child.XmlElement.Name, ElementName); 525XmlElement.InsertAfter(child.XmlElement, referenceSibling.XmlElement); 530if (referenceSibling.XmlElement.PreviousSibling?.NodeType == XmlNodeType.Whitespace) 532var newWhitespaceNode = XmlDocument.CreateWhitespace(referenceSibling.XmlElement.PreviousSibling.Value); 533XmlElement.InsertAfter(newWhitespaceNode, referenceSibling.XmlElement); 540XmlElement.InsertBefore(child.XmlElement, referenceSibling.XmlElement); 546if (child.XmlElement.PreviousSibling?.NodeType == XmlNodeType.Whitespace) 548var newWhitespaceNode = XmlDocument.CreateWhitespace(child.XmlElement.PreviousSibling.Value); 549XmlElement.InsertBefore(newWhitespaceNode, referenceSibling.XmlElement); 556XmlElement.AppendChild(child.XmlElement); 561if (XmlElement.FirstChild.NodeType == XmlNodeType.Whitespace) 563XmlElement.RemoveChild(XmlElement.FirstChild); 566var parentIndentation = GetElementIndentation(XmlElement); 571XmlElement.InsertBefore(leadingWhitespaceNode, child.XmlElement); 572XmlElement.InsertAfter(trailingWhiteSpaceNode, child.XmlElement); 604XmlElement.RemoveAttribute(child.XmlElement.Name); 608var previousSibling = child.XmlElement.PreviousSibling; 610XmlElement.RemoveChild(child.XmlElement); 618XmlElement.RemoveChild(previousSibling); 626if (XmlElement.HasChildNodes) 628if (XmlElement.ChildNodes.Cast<XmlNode>().All(c => c.NodeType == XmlNodeType.Whitespace)) 630XmlElement.IsEmpty = true;
Construction\ProjectExtensionsElement.cs (7)
67return Link != null ? ExtensionLink.Content : XmlElement.InnerXml; 79XmlElement.InnerXml = value; 111XmlElement idElement = XmlElement[name]; 128XmlElement idElement = XmlElement[name]; 137idElement = XmlDocument.CreateElement(name, XmlElement.NamespaceURI); 138XmlElement.AppendChild(idElement); 149XmlElement.RemoveChild(idElement);
Construction\ProjectItemElement.cs (2)
453XmlElementWithLocation newElement = XmlUtilities.RenameXmlElement(XmlElement, newItemType, XmlElement.NamespaceURI);
Construction\ProjectMetadataElement.cs (5)
82get => Link != null ? MetadataLink.Value : Internal.Utilities.GetXmlNodeInnerContents(XmlElement); 93Internal.Utilities.SetXmlNodeInnerContents(XmlElement, value); 137string oldName = XmlElement.Name; 141XmlElementWithLocation newElement = XmlUtilities.RenameXmlElement(XmlElement, newName, XmlElement.NamespaceURI);
Construction\ProjectPropertyElement.cs (4)
68get => Link != null ? PropertyLink.Value : Internal.Utilities.GetXmlNodeInnerContents(XmlElement); 82Internal.Utilities.SetXmlNodeInnerContents(XmlElement, value); 123XmlElementWithLocation newElement = XmlUtilities.RenameXmlElement(XmlElement, newName, XmlElement.NamespaceURI);
Construction\ProjectRootElement.cs (3)
1895sdkNode.XmlElement.GetAttribute("Name"), 1896sdkNode.XmlElement.GetAttribute("Version"), 1897sdkNode.XmlElement.GetAttribute("MinimumVersion"));
Construction\ProjectTargetElement.cs (1)
271XmlElement,
Construction\ProjectTaskElement.cs (5)
330XmlElement.SetAttribute(name, unevaluatedValue); 350XmlElement.RemoveAttribute(name); 374foreach (XmlAttribute attribute in XmlElement.Attributes) 387XmlElement.RemoveAttributeNode(attribute); 446foreach (XmlAttributeWithLocation attribute in XmlElement.Attributes)
Construction\ProjectUsingTaskBodyElement.cs (3)
64get => Link != null ? UsingTaskBodyLink.TaskBody : Internal.Utilities.GetXmlNodeInnerContents(XmlElement); 75Internal.Utilities.SetXmlNodeInnerContents(XmlElement, value); 167ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(parent.XmlElement, "TaskFactory");
Construction\ProjectUsingTaskParameterElement.cs (2)
75XmlElementWithLocation newElement = XmlUtilities.RenameXmlElement(XmlElement, value, XmlElement.NamespaceURI);
Construction\UsingTaskParameterGroupElement.cs (1)
136ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(parent.XmlElement, "TaskFactory");
Definition\Toolset.cs (1)
1086elementXml.XmlElement.Name);
Evaluation\Preprocessor.cs (3)
68AddToImportTable(entry.ImportingElement.XmlElement, entry.ImportedProject); 182XmlElement xmlElement = (XmlElement)documentElement.OwnerDocument.ImportNode(import.ImportingElement.XmlElement, false); 208XmlElement xmlElement = (XmlElement)documentElement.InsertAfter(documentElement.OwnerDocument.ImportNode(import.ImportingElement.XmlElement, false), documentElement.LastChild);
Instance\TaskRegistry.cs (1)
332ProjectXmlUtilities.VerifyThrowProjectNoChildElements(projectUsingTaskXml.XmlElement);
ObjectModelRemoting\ConstructionObjectLinks\ProjectElementLink.cs (5)
17/// <see cref="ProjectElement.XmlElement"/> and <see cref="ProjectElement.Link"/> 138if (xml.XmlElement.ChildNodes.Count == 1 && xml.XmlElement.FirstChild.NodeType == XmlNodeType.Text) 140result = xml.XmlElement.FirstChild.Value; 148foreach (XmlAttribute attribute in xml.XmlElement.Attributes)