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