Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlNode.cs
Go to the documentation of this file.
4using System.IO;
5using System.Text;
8
9namespace System.Xml;
10
11[DebuggerDisplay("{debuggerDisplayProxy}")]
13{
14 [DebuggerDisplay("{ToString()}")]
15 internal readonly struct DebuggerDisplayXmlNodeProxy
16 {
17 private readonly XmlNode _node;
18
23
24 public override string ToString()
25 {
26 XmlNodeType nodeType = _node.NodeType;
27 string text = nodeType.ToString();
28 switch (nodeType)
29 {
30 case XmlNodeType.Element:
31 case XmlNodeType.EntityReference:
32 text = text + ", Name=\"" + _node.Name + "\"";
33 break;
34 case XmlNodeType.Attribute:
35 case XmlNodeType.ProcessingInstruction:
36 text = text + ", Name=\"" + _node.Name + "\", Value=\"" + XmlConvert.EscapeValueForDebuggerDisplay(_node.Value) + "\"";
37 break;
38 case XmlNodeType.Text:
39 case XmlNodeType.CDATA:
40 case XmlNodeType.Comment:
41 case XmlNodeType.Whitespace:
42 case XmlNodeType.SignificantWhitespace:
43 case XmlNodeType.XmlDeclaration:
45 break;
46 case XmlNodeType.DocumentType:
47 {
49 text = text + ", Name=\"" + xmlDocumentType.Name + "\", SYSTEM=\"" + xmlDocumentType.SystemId + "\", PUBLIC=\"" + xmlDocumentType.PublicId + "\", Value=\"" + XmlConvert.EscapeValueForDebuggerDisplay(xmlDocumentType.InternalSubset) + "\"";
50 break;
51 }
52 }
53 return text;
54 }
55 }
56
58
59 public abstract string Name { get; }
60
61 public virtual string? Value
62 {
63 get
64 {
65 return null;
66 }
67 set
68 {
70 }
71 }
72
73 public abstract XmlNodeType NodeType { get; }
74
75 public virtual XmlNode? ParentNode
76 {
77 get
78 {
79 if (parentNode.NodeType != XmlNodeType.Document)
80 {
81 return parentNode;
82 }
84 {
86 do
87 {
88 if (xmlLinkedNode2 == this)
89 {
90 return parentNode;
91 }
93 }
94 while (xmlLinkedNode2 != null && xmlLinkedNode2 != xmlLinkedNode);
95 }
96 return null;
97 }
98 }
99
100 public virtual XmlNodeList ChildNodes => new XmlChildNodes(this);
101
102 public virtual XmlNode? PreviousSibling => null;
103
104 public virtual XmlNode? NextSibling => null;
105
106 public virtual XmlAttributeCollection? Attributes => null;
107
109 {
110 get
111 {
112 if (parentNode.NodeType == XmlNodeType.Document)
113 {
114 return (XmlDocument)parentNode;
115 }
117 }
118 }
119
120 public virtual XmlNode? FirstChild => LastNode?.next;
121
122 public virtual XmlNode? LastChild => LastNode;
123
124 internal virtual bool IsContainer => false;
125
126 internal virtual XmlLinkedNode? LastNode
127 {
128 get
129 {
130 return null;
131 }
132 set
133 {
134 }
135 }
136
137 public virtual bool HasChildNodes => LastNode != null;
138
139 public virtual string NamespaceURI => string.Empty;
140
141 public virtual string Prefix
142 {
143 get
144 {
145 return string.Empty;
146 }
147 set
148 {
149 }
150 }
151
152 public abstract string LocalName { get; }
153
154 public virtual bool IsReadOnly => HasReadOnlyParent(this);
155
156 public virtual string InnerText
157 {
158 get
159 {
161 if (firstChild == null)
162 {
163 return string.Empty;
164 }
165 if (firstChild.NextSibling == null)
166 {
168 if ((uint)(nodeType - 3) <= 1u || (uint)(nodeType - 13) <= 1u)
169 {
170 return firstChild.Value;
171 }
172 }
176 }
177 set
178 {
180 if (firstChild != null && firstChild.NextSibling == null && firstChild.NodeType == XmlNodeType.Text)
181 {
183 return;
184 }
185 RemoveAll();
187 }
188 }
189
190 public virtual string OuterXml
191 {
192 get
193 {
196 try
197 {
199 }
200 finally
201 {
202 xmlDOMTextWriter.Close();
203 }
204 return stringWriter.ToString();
205 }
206 }
207
208 public virtual string InnerXml
209 {
210 get
211 {
214 try
215 {
217 }
218 finally
219 {
220 xmlDOMTextWriter.Close();
221 }
222 return stringWriter.ToString();
223 }
224 set
225 {
227 }
228 }
229
231
232 public virtual string BaseURI
233 {
234 get
235 {
237 {
238 switch (xmlNode.NodeType)
239 {
240 case XmlNodeType.EntityReference:
241 return ((XmlEntityReference)xmlNode).ChildBaseURI;
242 case XmlNodeType.Attribute:
243 case XmlNodeType.Entity:
244 case XmlNodeType.Document:
245 return xmlNode.BaseURI;
246 }
247 }
248 return string.Empty;
249 }
250 }
251
253 {
254 get
255 {
256 if (NodeType == XmlNodeType.Document)
257 {
258 return (XmlDocument)this;
259 }
260 return OwnerDocument;
261 }
262 }
263
264 public virtual XmlElement? this[string name]
265 {
266 get
267 {
269 {
270 if (xmlNode.NodeType == XmlNodeType.Element && xmlNode.Name == name)
271 {
272 return (XmlElement)xmlNode;
273 }
274 }
275 return null;
276 }
277 }
278
279 public virtual XmlElement? this[string localname, string ns]
280 {
281 get
282 {
284 {
285 if (xmlNode.NodeType == XmlNodeType.Element && xmlNode.LocalName == localname && xmlNode.NamespaceURI == ns)
286 {
287 return (XmlElement)xmlNode;
288 }
289 }
290 return null;
291 }
292 }
293
294 internal virtual XmlSpace XmlSpace
295 {
296 get
297 {
298 XmlNode xmlNode = this;
299 XmlElement xmlElement = null;
300 do
301 {
303 {
304 string text = XmlConvert.TrimString(xmlElement2.GetAttribute("xml:space"));
305 if (text == "default")
306 {
307 return XmlSpace.Default;
308 }
309 if (text == "preserve")
310 {
311 return XmlSpace.Preserve;
312 }
313 }
314 xmlNode = xmlNode.ParentNode;
315 }
316 while (xmlNode != null);
317 return XmlSpace.None;
318 }
319 }
320
321 internal virtual string XmlLang
322 {
323 get
324 {
325 XmlNode xmlNode = this;
326 XmlElement xmlElement = null;
327 do
328 {
330 {
331 return xmlElement2.GetAttribute("xml:lang");
332 }
333 xmlNode = xmlNode.ParentNode;
334 }
335 while (xmlNode != null);
336 return string.Empty;
337 }
338 }
339
340 internal virtual XPathNodeType XPNodeType => (XPathNodeType)(-1);
341
342 internal virtual string XPLocalName => string.Empty;
343
344 internal virtual bool IsText => false;
345
346 public virtual XmlNode? PreviousText => null;
347
349
350 internal XmlNode()
351 {
352 }
353
355 {
356 if (doc == null)
357 {
359 }
360 parentNode = doc;
361 }
362
364 {
365 if (this is XmlDocument xmlDocument)
366 {
367 return xmlDocument.CreateNavigator(this);
368 }
370 return ownerDocument.CreateNavigator(this);
371 }
372
374 {
376 if (xPathNavigator != null)
377 {
379 if (xPathNodeIterator.MoveNext())
380 {
381 return ((IHasXmlNode)xPathNodeIterator.Current).GetNode();
382 }
383 }
384 return null;
385 }
386
388 {
390 if (xPathNavigator == null)
391 {
392 return null;
393 }
395 xPathExpression.SetContext(nsmgr);
396 return new XPathNodeList(xPathNavigator.Select(xPathExpression))[0];
397 }
398
400 {
402 if (xPathNavigator == null)
403 {
404 return null;
405 }
406 return new XPathNodeList(xPathNavigator.Select(xpath));
407 }
408
410 {
412 if (xPathNavigator == null)
413 {
414 return null;
415 }
417 xPathExpression.SetContext(nsmgr);
418 return new XPathNodeList(xPathNavigator.Select(xPathExpression));
419 }
420
421 internal bool AncestorNode(XmlNode node)
422 {
424 while (xmlNode != null && xmlNode != this)
425 {
426 if (xmlNode == node)
427 {
428 return true;
429 }
431 }
432 return false;
433 }
434
435 internal bool IsConnected()
436 {
438 while (xmlNode != null && xmlNode.NodeType != XmlNodeType.Document)
439 {
441 }
442 return xmlNode != null;
443 }
444
446 {
447 if (this == newChild || AncestorNode(newChild))
448 {
450 }
451 if (refChild == null)
452 {
453 return AppendChild(newChild);
454 }
455 if (!IsContainer)
456 {
458 }
459 if (refChild.ParentNode != this)
460 {
462 }
463 if (newChild == refChild)
464 {
465 return newChild;
466 }
469 if (ownerDocument != null && ownerDocument != ownerDocument2 && ownerDocument != this)
470 {
472 }
474 {
476 }
477 if (newChild.ParentNode != null)
478 {
479 newChild.ParentNode.RemoveChild(newChild);
480 }
481 if (newChild.NodeType == XmlNodeType.DocumentFragment)
482 {
485 if (xmlNode != null)
486 {
490 }
491 return firstChild;
492 }
494 {
496 }
499 string value = newChild.Value;
501 if (eventArgs != null)
502 {
504 }
506 {
509 xmlLinkedNode.SetParent(this);
510 if (xmlLinkedNode.IsText && xmlLinkedNode2.IsText)
511 {
513 }
514 }
515 else
516 {
520 xmlLinkedNode.SetParent(this);
521 if (xmlLinkedNode3.IsText)
522 {
523 if (xmlLinkedNode.IsText)
524 {
526 if (xmlLinkedNode2.IsText)
527 {
529 }
530 }
531 else if (xmlLinkedNode2.IsText)
532 {
534 }
535 }
536 else if (xmlLinkedNode.IsText && xmlLinkedNode2.IsText)
537 {
539 }
540 }
541 if (eventArgs != null)
542 {
544 }
545 return xmlLinkedNode;
546 }
547
549 {
550 if (this == newChild || AncestorNode(newChild))
551 {
553 }
554 if (refChild == null)
555 {
556 return PrependChild(newChild);
557 }
558 if (!IsContainer)
559 {
561 }
562 if (refChild.ParentNode != this)
563 {
565 }
566 if (newChild == refChild)
567 {
568 return newChild;
569 }
572 if (ownerDocument != null && ownerDocument != ownerDocument2 && ownerDocument != this)
573 {
575 }
577 {
579 }
580 if (newChild.ParentNode != null)
581 {
582 newChild.ParentNode.RemoveChild(newChild);
583 }
584 if (newChild.NodeType == XmlNodeType.DocumentFragment)
585 {
589 while (xmlNode != null)
590 {
596 }
597 return firstChild;
598 }
600 {
602 }
605 string value = newChild.Value;
607 if (eventArgs != null)
608 {
610 }
612 {
617 if (xmlLinkedNode2.IsText && xmlLinkedNode.IsText)
618 {
620 }
621 }
622 else
623 {
627 if (xmlLinkedNode2.IsText)
628 {
629 if (xmlLinkedNode.IsText)
630 {
632 if (xmlLinkedNode3.IsText)
633 {
635 }
636 }
637 else if (xmlLinkedNode3.IsText)
638 {
640 }
641 }
642 else if (xmlLinkedNode.IsText && xmlLinkedNode3.IsText)
643 {
645 }
646 }
647 if (eventArgs != null)
648 {
650 }
651 return xmlLinkedNode;
652 }
653
661
663 {
664 if (!IsContainer)
665 {
667 }
668 if (oldChild.ParentNode != this)
669 {
671 }
673 string value = xmlLinkedNode.Value;
675 if (eventArgs != null)
676 {
678 }
681 {
682 if (xmlLinkedNode == lastNode)
683 {
684 LastNode = null;
685 xmlLinkedNode.next = null;
687 }
688 else
689 {
691 if (next.IsText && xmlLinkedNode.IsText)
692 {
694 }
695 lastNode.next = next;
696 xmlLinkedNode.next = null;
698 }
699 }
700 else if (xmlLinkedNode == lastNode)
701 {
705 xmlLinkedNode.next = null;
707 }
708 else
709 {
712 if (next2.IsText)
713 {
714 if (xmlLinkedNode3.IsText)
715 {
717 }
718 else if (xmlLinkedNode.IsText)
719 {
721 }
722 }
724 xmlLinkedNode.next = null;
725 xmlLinkedNode.SetParent(null);
726 }
727 if (eventArgs != null)
728 {
730 }
731 return oldChild;
732 }
733
735 {
737 }
738
740 {
742 if (xmlDocument == null)
743 {
745 }
746 if (!IsContainer)
747 {
749 }
750 if (this == newChild || AncestorNode(newChild))
751 {
753 }
754 if (newChild.ParentNode != null)
755 {
756 newChild.ParentNode.RemoveChild(newChild);
757 }
759 if (ownerDocument != null && ownerDocument != xmlDocument && ownerDocument != this)
760 {
762 }
763 if (newChild.NodeType == XmlNodeType.DocumentFragment)
764 {
767 while (xmlNode != null)
768 {
773 }
774 return firstChild;
775 }
777 {
779 }
781 {
783 }
784 string value = newChild.Value;
786 if (eventArgs != null)
787 {
789 }
792 if (lastNode == null)
793 {
797 }
798 else
799 {
804 if (lastNode.IsText && xmlLinkedNode.IsText)
805 {
807 }
808 }
809 if (eventArgs != null)
810 {
812 }
813 return xmlLinkedNode;
814 }
815
817 {
818 XmlNodeChangedEventArgs insertEventArgsForLoad = doc.GetInsertEventArgsForLoad(newChild, this);
819 if (insertEventArgsForLoad != null)
820 {
821 doc.BeforeEvent(insertEventArgsForLoad);
822 }
825 if (lastNode == null)
826 {
830 }
831 else
832 {
836 if (lastNode.IsText && xmlLinkedNode.IsText)
837 {
839 }
840 else
841 {
842 xmlLinkedNode.SetParentForLoad(this);
843 }
844 }
845 if (insertEventArgsForLoad != null)
846 {
847 doc.AfterEvent(insertEventArgsForLoad);
848 }
849 return xmlLinkedNode;
850 }
851
852 internal virtual bool IsValidChildType(XmlNodeType type)
853 {
854 return false;
855 }
856
858 {
859 return true;
860 }
861
863 {
864 return true;
865 }
866
867 public abstract XmlNode CloneNode(bool deep);
868
869 internal virtual void CopyChildren(XmlDocument doc, XmlNode container, bool deep)
870 {
871 for (XmlNode xmlNode = container.FirstChild; xmlNode != null; xmlNode = xmlNode.NextSibling)
872 {
873 AppendChildForLoad(xmlNode.CloneNode(deep), doc);
874 }
875 }
876
877 public virtual void Normalize()
878 {
879 XmlNode xmlNode = null;
883 {
885 switch (xmlNode2.NodeType)
886 {
887 case XmlNodeType.Text:
888 case XmlNodeType.Whitespace:
889 case XmlNodeType.SignificantWhitespace:
890 {
891 stringBuilder.Append(xmlNode2.Value);
893 if (xmlNode3 == xmlNode)
894 {
896 continue;
897 }
898 if (xmlNode != null)
899 {
901 }
903 continue;
904 }
905 case XmlNodeType.Element:
906 xmlNode2.Normalize();
907 break;
908 }
909 if (xmlNode != null)
910 {
911 xmlNode.Value = stringBuilder.ToString();
912 xmlNode = null;
913 }
914 stringBuilder.Remove(0, stringBuilder.Length);
915 }
916 if (xmlNode != null && stringBuilder.Length > 0)
917 {
918 xmlNode.Value = stringBuilder.ToString();
919 }
921 }
922
924 {
925 if (firstNode == null)
926 {
927 return secondNode;
928 }
929 if (firstNode.NodeType == XmlNodeType.Text)
930 {
931 return firstNode;
932 }
933 if (secondNode.NodeType == XmlNodeType.Text)
934 {
935 return secondNode;
936 }
937 if (firstNode.NodeType == XmlNodeType.SignificantWhitespace)
938 {
939 return firstNode;
940 }
941 if (secondNode.NodeType == XmlNodeType.SignificantWhitespace)
942 {
943 return secondNode;
944 }
945 if (firstNode.NodeType == XmlNodeType.Whitespace)
946 {
947 return firstNode;
948 }
949 if (secondNode.NodeType == XmlNodeType.Whitespace)
950 {
951 return secondNode;
952 }
953 return null;
954 }
955
956 public virtual bool Supports(string feature, string version)
957 {
958 if (string.Equals("XML", feature, StringComparison.OrdinalIgnoreCase))
959 {
960 switch (version)
961 {
962 case null:
963 case "1.0":
964 case "2.0":
965 return true;
966 }
967 }
968 return false;
969 }
970
971 internal static bool HasReadOnlyParent(XmlNode n)
972 {
973 while (n != null)
974 {
975 switch (n.NodeType)
976 {
977 case XmlNodeType.EntityReference:
978 case XmlNodeType.Entity:
979 return true;
980 case XmlNodeType.Attribute:
981 n = ((XmlAttribute)n).OwnerElement;
982 break;
983 default:
984 n = n.ParentNode;
985 break;
986 }
987 }
988 return false;
989 }
990
991 public virtual XmlNode Clone()
992 {
993 return CloneNode(deep: true);
994 }
995
997 {
998 return CloneNode(deep: true);
999 }
1000
1002 {
1003 return new XmlChildEnumerator(this);
1004 }
1005
1007 {
1008 return new XmlChildEnumerator(this);
1009 }
1010
1012 {
1014 {
1015 if (xmlNode.FirstChild == null)
1016 {
1017 if (xmlNode.NodeType == XmlNodeType.Text || xmlNode.NodeType == XmlNodeType.CDATA || xmlNode.NodeType == XmlNodeType.Whitespace || xmlNode.NodeType == XmlNodeType.SignificantWhitespace)
1018 {
1019 builder.Append(xmlNode.InnerText);
1020 }
1021 }
1022 else
1023 {
1024 xmlNode.AppendChildText(builder);
1025 }
1026 }
1027 }
1028
1029 public abstract void WriteTo(XmlWriter w);
1030
1031 public abstract void WriteContentTo(XmlWriter w);
1032
1033 public virtual void RemoveAll()
1034 {
1036 XmlNode xmlNode2 = null;
1037 while (xmlNode != null)
1038 {
1041 xmlNode = xmlNode2;
1042 }
1043 }
1044
1045 public virtual string GetNamespaceOfPrefix(string prefix)
1046 {
1048 return namespaceOfPrefixStrict ?? string.Empty;
1049 }
1050
1051 internal string GetNamespaceOfPrefixStrict(string prefix)
1052 {
1054 string array = prefix;
1055 if (document != null)
1056 {
1058 if (array == null)
1059 {
1060 return null;
1061 }
1062 XmlNode xmlNode = this;
1063 while (xmlNode != null)
1064 {
1065 if (xmlNode.NodeType == XmlNodeType.Element)
1066 {
1068 if (xmlElement.HasAttributes)
1069 {
1070 XmlAttributeCollection attributes = xmlElement.Attributes;
1071 if (array.Length == 0)
1072 {
1073 for (int i = 0; i < attributes.Count; i++)
1074 {
1075 XmlAttribute xmlAttribute = attributes[i];
1076 if (xmlAttribute.Prefix.Length == 0 && Ref.Equal(xmlAttribute.LocalName, document.strXmlns))
1077 {
1078 return xmlAttribute.Value;
1079 }
1080 }
1081 }
1082 else
1083 {
1084 for (int j = 0; j < attributes.Count; j++)
1085 {
1086 XmlAttribute xmlAttribute2 = attributes[j];
1087 if (Ref.Equal(xmlAttribute2.Prefix, document.strXmlns))
1088 {
1089 if (Ref.Equal(xmlAttribute2.LocalName, array))
1090 {
1091 return xmlAttribute2.Value;
1092 }
1093 }
1094 else if (Ref.Equal(xmlAttribute2.Prefix, array))
1095 {
1096 return xmlAttribute2.NamespaceURI;
1097 }
1098 }
1099 }
1100 }
1101 if (Ref.Equal(xmlNode.Prefix, array))
1102 {
1103 return xmlNode.NamespaceURI;
1104 }
1105 xmlNode = xmlNode.ParentNode;
1106 }
1107 else
1108 {
1109 xmlNode = ((xmlNode.NodeType != XmlNodeType.Attribute) ? xmlNode.ParentNode : ((XmlAttribute)xmlNode).OwnerElement);
1110 }
1111 }
1112 if (Ref.Equal(document.strXml, array))
1113 {
1114 return document.strReservedXml;
1115 }
1116 if (Ref.Equal(document.strXmlns, array))
1117 {
1118 return document.strReservedXmlns;
1119 }
1120 }
1121 return null;
1122 }
1123
1124 public virtual string GetPrefixOfNamespace(string namespaceURI)
1125 {
1127 if (prefixOfNamespaceStrict == null)
1128 {
1129 return string.Empty;
1130 }
1132 }
1133
1135 {
1137 if (document != null)
1138 {
1140 XmlNode xmlNode = this;
1141 while (xmlNode != null)
1142 {
1143 if (xmlNode.NodeType == XmlNodeType.Element)
1144 {
1146 if (xmlElement.HasAttributes)
1147 {
1148 XmlAttributeCollection attributes = xmlElement.Attributes;
1149 for (int i = 0; i < attributes.Count; i++)
1150 {
1151 XmlAttribute xmlAttribute = attributes[i];
1152 if (xmlAttribute.Prefix.Length == 0)
1153 {
1154 if (Ref.Equal(xmlAttribute.LocalName, document.strXmlns) && xmlAttribute.Value == namespaceURI)
1155 {
1156 return string.Empty;
1157 }
1158 }
1159 else if (Ref.Equal(xmlAttribute.Prefix, document.strXmlns))
1160 {
1161 if (xmlAttribute.Value == namespaceURI)
1162 {
1163 return xmlAttribute.LocalName;
1164 }
1165 }
1166 else if (Ref.Equal(xmlAttribute.NamespaceURI, namespaceURI))
1167 {
1168 return xmlAttribute.Prefix;
1169 }
1170 }
1171 }
1172 if (Ref.Equal(xmlNode.NamespaceURI, namespaceURI))
1173 {
1174 return xmlNode.Prefix;
1175 }
1176 xmlNode = xmlNode.ParentNode;
1177 }
1178 else
1179 {
1180 xmlNode = ((xmlNode.NodeType != XmlNodeType.Attribute) ? xmlNode.ParentNode : ((XmlAttribute)xmlNode).OwnerElement);
1181 }
1182 }
1183 if (Ref.Equal(document.strReservedXml, namespaceURI))
1184 {
1185 return document.strXml;
1186 }
1187 if (Ref.Equal(document.strReservedXmlns, namespaceURI))
1188 {
1189 return document.strXmlns;
1190 }
1191 }
1192 return null;
1193 }
1194
1195 internal virtual void SetParent(XmlNode node)
1196 {
1197 if (node == null)
1198 {
1200 }
1201 else
1202 {
1203 parentNode = node;
1204 }
1205 }
1206
1207 internal virtual void SetParentForLoad(XmlNode node)
1208 {
1209 parentNode = node;
1210 }
1211
1212 internal static void SplitName(string name, out string prefix, out string localName)
1213 {
1214 int num = name.IndexOf(':');
1215 if (-1 == num || num == 0 || name.Length - 1 == num)
1216 {
1217 prefix = string.Empty;
1218 localName = name;
1219 }
1220 else
1221 {
1222 prefix = name.Substring(0, num);
1223 localName = name.Substring(num + 1);
1224 }
1225 }
1226
1228 {
1230 {
1231 if (xmlNode.NodeType == type)
1232 {
1233 return xmlNode;
1234 }
1235 }
1236 return null;
1237 }
1238
1240 {
1242 if (ownerDocument != null)
1243 {
1244 if (!ownerDocument.IsLoading && ((newParent != null && newParent.IsReadOnly) || (oldParent != null && oldParent.IsReadOnly)))
1245 {
1247 }
1248 return ownerDocument.GetEventArgs(node, oldParent, newParent, oldValue, newValue, action);
1249 }
1250 return null;
1251 }
1252
1254 {
1255 if (args != null)
1256 {
1258 }
1259 }
1260
1262 {
1263 if (args != null)
1264 {
1266 }
1267 }
1268
1269 internal virtual string GetXPAttribute(string localName, string namespaceURI)
1270 {
1271 return string.Empty;
1272 }
1273
1275 {
1277 }
1278
1280 {
1281 nextNode.parentNode = prevNode.ParentNode;
1282 }
1283}
static CultureInfo InvariantCulture
static string Xdom_Node_Insert_Contain
Definition SR.cs:1330
static string Xdom_Node_Remove_Child
Definition SR.cs:1342
static string Xdom_Node_Insert_TypeConflict
Definition SR.cs:1338
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Xdom_Node_Insert_Context
Definition SR.cs:1334
static string Xdom_Node_Modify_ReadOnly
Definition SR.cs:1344
static string Xdom_Node_Insert_Child
Definition SR.cs:1328
static string Xdom_Node_SetVal
Definition SR.cs:1298
static string Xdom_Node_Insert_Location
Definition SR.cs:1336
static string Xdom_Node_Remove_Contain
Definition SR.cs:1340
static string Xdom_Node_Null_Doc
Definition SR.cs:1326
static string Xdom_Set_InnerXml
Definition SR.cs:1302
static string Xdom_Node_Insert_Path
Definition SR.cs:1332
Definition SR.cs:7
static string GetStringAndRelease(StringBuilder sb)
static void Release(StringBuilder sb)
static StringBuilder Acquire(int capacity=16)
static bool Equal(string strA, string strB)
Definition Ref.cs:5
static XPathExpression Compile(string xpath)
virtual XPathNavigator CreateNavigator()
static string TrimString(string value)
static string EscapeValueForDebuggerDisplay(string value)
static IXmlSchemaInfo NotKnownSchemaInfo
virtual XmlText CreateTextNode(string? text)
override? XmlDocument OwnerDocument
override? XPathNavigator CreateNavigator()
override void BeforeEvent(XmlNodeChangedEventArgs args)
override void AfterEvent(XmlNodeChangedEventArgs args)
virtual string GetAttribute(string name)
virtual bool HasAttribute(string name)
override? XmlNode PreviousSibling
string Add(char[] array, int offset, int length)
string? Get(char[] array, int offset, int length)
virtual XmlNodeChangedEventArgs GetEventArgs(XmlNode node, XmlNode oldParent, XmlNode newParent, string oldValue, string newValue, XmlNodeChangedAction action)
Definition XmlNode.cs:1239
virtual ? string Value
Definition XmlNode.cs:62
void WriteContentTo(XmlWriter w)
virtual string BaseURI
Definition XmlNode.cs:233
IEnumerator GetEnumerator()
Definition XmlNode.cs:1006
virtual bool Supports(string feature, string version)
Definition XmlNode.cs:956
bool AncestorNode(XmlNode node)
Definition XmlNode.cs:421
virtual XmlNodeList ChildNodes
Definition XmlNode.cs:100
virtual bool CanInsertAfter(XmlNode newChild, XmlNode refChild)
Definition XmlNode.cs:862
virtual ? XmlNode PreviousSibling
Definition XmlNode.cs:102
void WriteTo(XmlWriter w)
virtual XmlNode FindChild(XmlNodeType type)
Definition XmlNode.cs:1227
virtual ? XmlNode AppendChild(XmlNode newChild)
Definition XmlNode.cs:739
XmlDocument Document
Definition XmlNode.cs:253
XmlNode parentNode
Definition XmlNode.cs:57
virtual bool CanInsertBefore(XmlNode newChild, XmlNode refChild)
Definition XmlNode.cs:857
XmlNodeList? SelectNodes(string xpath)
Definition XmlNode.cs:399
XmlNode NormalizeWinner(XmlNode firstNode, XmlNode secondNode)
Definition XmlNode.cs:923
virtual ? XmlNode PrependChild(XmlNode newChild)
Definition XmlNode.cs:734
virtual string InnerText
Definition XmlNode.cs:157
virtual void CopyChildren(XmlDocument doc, XmlNode container, bool deep)
Definition XmlNode.cs:869
virtual string OuterXml
Definition XmlNode.cs:191
virtual ? XmlNode ParentNode
Definition XmlNode.cs:76
XmlNode(XmlDocument doc)
Definition XmlNode.cs:354
virtual bool IsContainer
Definition XmlNode.cs:124
static void NestTextNodes(XmlNode prevNode, XmlNode nextNode)
Definition XmlNode.cs:1274
virtual bool IsReadOnly
Definition XmlNode.cs:154
virtual XmlNode ReplaceChild(XmlNode newChild, XmlNode oldChild)
Definition XmlNode.cs:654
virtual void AfterEvent(XmlNodeChangedEventArgs args)
Definition XmlNode.cs:1261
void AppendChildText(StringBuilder builder)
Definition XmlNode.cs:1011
virtual void BeforeEvent(XmlNodeChangedEventArgs args)
Definition XmlNode.cs:1253
virtual ? XPathNavigator CreateNavigator()
Definition XmlNode.cs:363
virtual string XmlLang
Definition XmlNode.cs:322
virtual ? XmlNode NextSibling
Definition XmlNode.cs:104
virtual bool IsValidChildType(XmlNodeType type)
Definition XmlNode.cs:852
static void UnnestTextNodes(XmlNode prevNode, XmlNode nextNode)
Definition XmlNode.cs:1279
virtual string NamespaceURI
Definition XmlNode.cs:139
virtual string GetNamespaceOfPrefix(string prefix)
Definition XmlNode.cs:1045
virtual ? XmlNode InsertAfter(XmlNode newChild, XmlNode? refChild)
Definition XmlNode.cs:548
virtual ? XmlDocument OwnerDocument
Definition XmlNode.cs:109
virtual ? XmlNode LastChild
Definition XmlNode.cs:122
virtual string GetXPAttribute(string localName, string namespaceURI)
Definition XmlNode.cs:1269
virtual ? XmlNode PreviousText
Definition XmlNode.cs:346
virtual void Normalize()
Definition XmlNode.cs:877
virtual XmlNode Clone()
Definition XmlNode.cs:991
virtual ? XmlNode InsertBefore(XmlNode newChild, XmlNode? refChild)
Definition XmlNode.cs:445
virtual ? XmlLinkedNode LastNode
Definition XmlNode.cs:127
virtual bool IsText
Definition XmlNode.cs:344
virtual string InnerXml
Definition XmlNode.cs:209
virtual XmlNode RemoveChild(XmlNode oldChild)
Definition XmlNode.cs:662
virtual ? XmlNode FirstChild
Definition XmlNode.cs:120
virtual void SetParent(XmlNode node)
Definition XmlNode.cs:1195
string GetNamespaceOfPrefixStrict(string prefix)
Definition XmlNode.cs:1051
XmlNode? SelectSingleNode(string xpath)
Definition XmlNode.cs:373
virtual string Prefix
Definition XmlNode.cs:142
virtual XPathNodeType XPNodeType
Definition XmlNode.cs:340
string GetPrefixOfNamespaceStrict(string namespaceURI)
Definition XmlNode.cs:1134
virtual ? XmlAttributeCollection Attributes
Definition XmlNode.cs:106
XmlNodeType NodeType
Definition XmlNode.cs:73
static void SplitName(string name, out string prefix, out string localName)
Definition XmlNode.cs:1212
virtual void RemoveAll()
Definition XmlNode.cs:1033
virtual string XPLocalName
Definition XmlNode.cs:342
object debuggerDisplayProxy
Definition XmlNode.cs:348
XmlNode? SelectSingleNode(string xpath, XmlNamespaceManager nsmgr)
Definition XmlNode.cs:387
virtual bool HasChildNodes
Definition XmlNode.cs:137
virtual XmlNode AppendChildForLoad(XmlNode newChild, XmlDocument doc)
Definition XmlNode.cs:816
XmlNodeList? SelectNodes(string xpath, XmlNamespaceManager nsmgr)
Definition XmlNode.cs:409
static bool HasReadOnlyParent(XmlNode n)
Definition XmlNode.cs:971
virtual void SetParentForLoad(XmlNode node)
Definition XmlNode.cs:1207
XmlNode CloneNode(bool deep)
virtual string GetPrefixOfNamespace(string namespaceURI)
Definition XmlNode.cs:1124