From a4fca9d3e97c648639bb5685b7b4f0c063bd894f Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Tue, 22 Apr 2025 16:37:39 -0700 Subject: [PATCH 1/2] add language slugs --- xml/System.Xml.Linq/XAttribute.xml | 78 +++++------ xml/System.Xml.Linq/XDocument.xml | 20 +-- xml/System.Xml.Linq/XElement.xml | 126 +++++++++-------- xml/System.Xml.Linq/XName.xml | 18 +-- xml/System.Xml.Linq/XNamespace.xml | 24 ++-- .../XProcessingInstruction.xml | 8 +- xml/System.Xml.Linq/XStreamingElement.xml | 14 +- xml/System.Xml.Schema/XmlSchemaCollection.xml | 2 +- xml/System.Xml.Schema/XmlSchemaSet.xml | 6 +- .../XmlAttributeEventArgs.xml | 8 +- .../XmlAttributes.xml | 2 +- .../XmlSerializer.xml | 6 +- xml/System.Xml.XPath/XPathNavigator.xml | 127 ------------------ xml/System.Xml.Xsl/XslTransform.xml | 32 ++--- xml/System.Xml/XmlDictionaryWriter.xml | 1 - xml/System.Xml/XmlDocument.xml | 26 ++-- xml/System.Xml/XmlNamespaceManager.xml | 4 +- xml/System.Xml/XmlNode.xml | 12 +- xml/System.Xml/XmlReader.xml | 7 +- xml/System.Xml/XmlReaderSettings.xml | 4 +- xml/System.Xml/XmlTextReader.xml | 7 +- xml/System.Xml/XmlWriter.xml | 4 +- 22 files changed, 194 insertions(+), 342 deletions(-) diff --git a/xml/System.Xml.Linq/XAttribute.xml b/xml/System.Xml.Linq/XAttribute.xml index c407262531e..667730c444f 100644 --- a/xml/System.Xml.Linq/XAttribute.xml +++ b/xml/System.Xml.Linq/XAttribute.xml @@ -177,8 +177,7 @@ End If This example produces the following output: -``` - +```txt Creating a deep copy created a new attribute from the original. ``` @@ -311,8 +310,7 @@ Console.WriteLine(root) This example produces the following output: -``` - +```xml ``` @@ -459,7 +457,7 @@ Next This example produces the following output: -``` +```txt {http://www.w3.org/2000/xmlns/}aw is a namespace declaration {http://www.adventure-works.com}Att is not a namespace declaration ``` @@ -568,12 +566,11 @@ Dim NewRoot As XElement = _ For Each att As XAttribute In NewRoot.Attributes() Console.WriteLine("{0}={1}", att.Name, att.Value) Next - ``` This example produces the following output: -``` +```txt {http://www.w3.org/2000/xmlns/}aw=http://www.adventure-works.com {http://www.adventure-works.com}Att=content Att2=different content @@ -675,7 +672,7 @@ Loop While (Not (att Is Nothing)) This example produces the following output: -``` +```txt Att1="1" Att2="2" Att3="3" @@ -755,8 +752,7 @@ Console.WriteLine(att.NodeType.ToString) This example produces the following output: -``` - +```txt Attribute ``` @@ -841,7 +837,7 @@ Console.WriteLine("(bool)BoolValue={0}", bv) This example produces the following output: -``` +```txt (bool)BoolValue=True ``` @@ -960,7 +956,7 @@ Console.WriteLine("OrderDate={0:d}", orderDate) This example produces the following output: -``` +```txt dt=10/6/2006 12:30:00 PM ----- @@ -1058,7 +1054,7 @@ Console.WriteLine("dt={0}", dt) This example produces the following output: -``` +```txt dt=10/6/2006 12:30:00 PM -07:00 ``` @@ -1140,7 +1136,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=79228162514264337593543950335 ``` @@ -1221,7 +1217,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=1.79769313486231E+308 ``` @@ -1302,7 +1298,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=3c1cc55b-baff-4b7a-9d17-077af3aa5730 ``` @@ -1383,7 +1379,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=2147483647 ``` @@ -1464,7 +1460,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=9223372036854775807 ``` @@ -1556,7 +1552,7 @@ Console.WriteLine("Nullable boolean: BoolValue2={0}", bool2) This example produces the following output: -``` +```txt Nullable boolean: BoolValue1=True Nullable boolean: BoolValue2=False ``` @@ -1647,7 +1643,7 @@ Console.WriteLine("Nullable DateTime: value={0}", IIf(value.HasValue, value.ToSt This example produces the following output: -``` +```txt Nullable DateTime: value=10/6/2006 12:30:00 PM ``` @@ -1735,7 +1731,7 @@ Console.WriteLine("Nullable DateTimeOffset: value={0}", IIf(value.HasValue, valu This example produces the following output: -``` +```txt Nullable DateTimeOffset: value=10/6/2006 12:30:00 PM -07:00 ``` @@ -1814,7 +1810,7 @@ Console.WriteLine("Nullable decimal: value={0}", IIf(value.HasValue, value.ToStr This example produces the following output: -``` +```txt Nullable decimal: value=79228162514264337593543950335 ``` @@ -1895,7 +1891,7 @@ Console.WriteLine("Nullable double: value={0}", IIf(value.HasValue, value.ToStri This example produces the following output: -``` +```txt Nullable double: value=1.79769313486231E+308 ``` @@ -1976,7 +1972,7 @@ Console.WriteLine("Nullable Guid: value={0}", IIf(value.HasValue, value.ToString This example produces the following output: -``` +```txt Nullable Guid: value=3c1cc55b-baff-4b7a-9d17-077af3aa5730 ``` @@ -2057,7 +2053,7 @@ Console.WriteLine("Nullable int: value={0}", IIf(value.HasValue, value.ToString( This example produces the following output: -``` +```txt Nullable int: value=2147483647 ``` @@ -2137,7 +2133,7 @@ Console.WriteLine("Nullable long: value={0}", IIf(value.HasValue, value.ToString This example produces the following output: -``` +```txt Nullable long: value=9223372036854775807 ``` @@ -2218,7 +2214,7 @@ Console.WriteLine("Nullable Single: value={0}", IIf(value.HasValue, value.ToStri This example produces the following output: -``` +```txt Nullable Single: value=3.402823E+38 ``` @@ -2306,7 +2302,7 @@ Console.WriteLine("Nullable TimeSpan: value={0}", IIf(value.HasValue, value.ToSt This example produces the following output: -``` +```txt Nullable TimeSpan: value=01:05:30 ``` @@ -2387,7 +2383,7 @@ Console.WriteLine("Nullable uint: value={0}", IIf(value.HasValue, value.ToString This example produces the following output: -``` +```txt Nullable uint: value=4294967295 ``` @@ -2468,7 +2464,7 @@ Console.WriteLine("Nullable ulong: value={0}", IIf(value.HasValue, value.ToStrin This example produces the following output: -``` +```txt Nullable ulong: value=9223372036854775807 ``` @@ -2548,7 +2544,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=3.402823E+38 ``` @@ -2632,7 +2628,7 @@ Console.WriteLine("(string)att={0}", str) This example produces the following output: -``` +```txt (string)att=attribute content ``` @@ -2718,7 +2714,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=01:05:30 ``` @@ -2799,7 +2795,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=4294967295 ``` @@ -2880,7 +2876,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=1844674407370955161 ``` @@ -2979,7 +2975,7 @@ Loop While (Not (att Is Nothing)) This example produces the following output: -``` +```txt Att4="4" Att3="3" Att2="2" @@ -3066,7 +3062,7 @@ Console.WriteLine(root) This example produces the following output: -``` +```txt ``` @@ -3153,7 +3149,7 @@ Console.WriteLine(root) This example produces the following output: -``` +```txt ``` @@ -3240,7 +3236,7 @@ Console.WriteLine(att.ToString()) This example produces the following output: -``` +```txt Att2="content2" ``` @@ -3331,7 +3327,7 @@ Console.WriteLine(root.@Att) This example produces the following output: -``` +```txt content new text ``` @@ -3463,7 +3459,7 @@ Console.WriteLine("v4:{0}", IIf(v4.HasValue, v4, "attribute does not exist")) This example produces the following output: -``` +```txt c1:attribute 1 content c2:2 c3:attribute does not exist diff --git a/xml/System.Xml.Linq/XDocument.xml b/xml/System.Xml.Linq/XDocument.xml index c59310a6009..96b9727e8fc 100644 --- a/xml/System.Xml.Linq/XDocument.xml +++ b/xml/System.Xml.Linq/XDocument.xml @@ -731,7 +731,7 @@ Console.WriteLine(doc.Declaration) This example produces the following output: -``` +```txt ``` @@ -1163,7 +1163,7 @@ Console.WriteLine(doc) This example produces the following output: -``` +```txt
Ellen Adams @@ -1515,7 +1515,7 @@ Console.WriteLine("Count of white space nodes (preserving whitespace): {0}", whi This example produces the following output: -``` +```txt Count of white space nodes (not preserving whitespace): 0 Count of white space nodes (preserving whitespace): 3 ``` @@ -1628,7 +1628,7 @@ Console.WriteLine("nodes if preserving whitespace: {0}", doc2.DescendantNodes(). This example produces the following output: -``` +```txt nodes if not preserving whitespace: 48 nodes if preserving whitespace: 82 ``` @@ -1779,7 +1779,7 @@ End Using This example produces the following output: -``` +```txt Element Name Line Position ------------ ---- -------- Root 1 2 @@ -2020,7 +2020,7 @@ Console.WriteLine("{0}", xmlTree.NodeType) This example produces the following output: -``` +```txt Document ``` @@ -2295,7 +2295,7 @@ Console.WriteLine("nodes when not preserving whitespace: {0}", doc2.DescendantNo This example produces the following output: -``` +```txt nodes when preserving whitespace: 8 nodes when not preserving whitespace: 4 ``` @@ -2409,7 +2409,7 @@ Console.WriteLine(doc.Root.Name.ToString()) This example produces the following output: -``` +```txt Pubs ``` @@ -2933,7 +2933,7 @@ End Using This example produces the following output: -``` +```txt content @@ -3032,7 +3032,7 @@ Console.WriteLine(File.ReadAllText("Root2.xml")) This example produces the following output: -``` +```txt content diff --git a/xml/System.Xml.Linq/XElement.xml b/xml/System.Xml.Linq/XElement.xml index d2cad372235..d268ffed61a 100644 --- a/xml/System.Xml.Linq/XElement.xml +++ b/xml/System.Xml.Linq/XElement.xml @@ -383,7 +383,7 @@ Console.WriteLine("xmlTree = treeClone: {0}", XNode.DeepEquals(xmlTree, treeClon This example produces the following output: -``` +```txt xmlTree = treeClone: True xmlTree = treeClone: False ``` @@ -578,7 +578,7 @@ Console.WriteLine(xse) This example produces the following output: -``` +```txt 2 3 @@ -1365,7 +1365,7 @@ Next This example produces the following output: -``` +```txt GrandChild Child Root @@ -1470,7 +1470,7 @@ Next This example produces the following output: -``` +```txt Child ``` @@ -1554,7 +1554,7 @@ Console.WriteLine(att) This example produces the following output: -``` +```txt Att="attribute content" ``` @@ -1585,7 +1585,7 @@ End Module This example produces the following output: -``` +```txt aw:Att="attribute content" ``` @@ -1698,7 +1698,7 @@ Next This example produces the following output: -``` +```txt Att1="content1" Att2="content2" ``` @@ -1739,7 +1739,7 @@ End Module This example produces the following output: -``` +```txt aw:Att1="content1" aw:Att2="content2" xmlns:aw="http://www.adventure-works.com" @@ -1837,7 +1837,7 @@ Next This example produces the following output: -``` +```txt Att1="content1" ``` @@ -1873,7 +1873,7 @@ End Module This example produces the following output: -``` +```txt aw:Att1="content1" ``` @@ -1976,7 +1976,7 @@ Next This example produces the following output: -``` +```txt Root Child Some text @@ -2093,7 +2093,7 @@ Next This example produces the following output: -``` +```txt Root Child GrandChild @@ -2196,7 +2196,7 @@ Next This example produces the following output: -``` +```txt Child ``` @@ -2328,7 +2328,7 @@ Console.WriteLine(xmlTree.FirstAttribute) This example produces the following output: -``` +```txt Att1="1" ``` @@ -2413,7 +2413,7 @@ End Module This example produces the following output: -``` +```txt Default namespace: http://www.adventure-works.com ``` @@ -2499,7 +2499,7 @@ End Module This example produces the following output: -``` +```txt Namespace: http://www.adventure-works.com ``` @@ -2585,7 +2585,7 @@ End Module This example produces the following output: -``` +```txt Prefix: aw ``` @@ -2659,7 +2659,7 @@ Console.WriteLine(xmlTree2.HasAttributes) This example produces the following output: -``` +```txt True False ``` @@ -2737,7 +2737,7 @@ Console.WriteLine(xmlTree2.HasElements) This example produces the following output: -``` +```txt True False ``` @@ -2836,7 +2836,7 @@ Console.WriteLine(el3.IsEmpty) This example produces the following output: -``` +```txt True @@ -2932,7 +2932,7 @@ Console.WriteLine(xmlTree.LastAttribute) This example produces the following output: -``` +```txt Att3="3" ``` @@ -3211,7 +3211,7 @@ Console.WriteLine(xmlTree2.Name) This example produces the following output: -``` +```txt Root ``` @@ -3521,7 +3521,7 @@ Console.WriteLine("Count of white space nodes (preserving whitespace): {0}", whi This example produces the following output: -``` +```txt Count of white space nodes (not preserving whitespace): 0 Count of white space nodes (preserving whitespace): 3 ``` @@ -3580,7 +3580,7 @@ Next This example produces the following output: -``` +```txt Element Name Line Position ------------ ---- -------- Root 1 2 @@ -3721,7 +3721,7 @@ Console.WriteLine("Count of white space nodes (preserving whitespace): {0}", whi This example produces the following output: -``` +```txt Count of white space nodes (not preserving whitespace): 0 Count of white space nodes (preserving whitespace): 3 @@ -3775,7 +3775,7 @@ Next This example produces the following output: -``` +```txt BaseUri: PurchaseOrder.xml Element Name Line Position @@ -3951,7 +3951,7 @@ End Using This example produces the following output: -``` +```txt Element Name Line Position ------------ ---- -------- Root 1 2 @@ -4209,7 +4209,7 @@ End Module This example produces the following output: -``` +```txt Root {http://www.adventure-works.com}Root http://www.adventure-works.com @@ -4286,7 +4286,7 @@ Console.WriteLine() This example produces the following output: -``` +```txt Element ``` @@ -4378,7 +4378,7 @@ Console.WriteLine("(bool)BoolValue2={0}", bool2) This example produces the following output: -``` +```txt (bool)BoolValue1=True (bool)BoolValue2=False ``` @@ -4490,7 +4490,7 @@ Console.WriteLine("orderDate={0:d}", orderDate) This example produces the following output: -``` +```txt 2006-10-06T12:30:00 dt=10/6/2006 12:30:00 PM ----- @@ -4588,7 +4588,7 @@ Console.WriteLine("dt={0}", dt) This example produces the following output: -``` +```txt 2006-10-06T12:30:00-07:00 @@ -4669,12 +4669,11 @@ Console.WriteLine("value={0}", value); Dim root As XElement = 79228162514264337593543950335 Dim value As Decimal = CDec(root) Console.WriteLine("value={0}", value) - ``` This example produces the following output: -``` +```txt value=79228162514264337593543950335 ``` @@ -4755,7 +4754,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=1.79769313486231E+308 ``` @@ -4837,7 +4836,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=3c1cc55b-baff-4b7a-9d17-077af3aa5730 ``` @@ -4919,7 +4918,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=2147483647 ``` @@ -4999,7 +4998,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=9223372036854775807 ``` @@ -5096,7 +5095,7 @@ Console.WriteLine("Nullable Boolean: value2={0}", IIf(value2.HasValue, value2.To This example produces the following output: -``` +```txt Nullable Boolean: value1=True Nullable Boolean: value2=False ``` @@ -5189,7 +5188,7 @@ Console.WriteLine("Nullable DateTime: value={0}", IIf(value.HasValue, value.ToSt This example produces the following output: -``` +```txt Nullable DateTime: value=10/6/2006 12:30:00 PM ``` @@ -5281,7 +5280,7 @@ Console.WriteLine("dt={0}", dt) This example produces the following output: -``` +```txt 2006-10-06T12:30:00-07:00 @@ -5369,7 +5368,7 @@ Console.WriteLine("Nullable decimal: value={0}", IIf(value.HasValue, value.ToStr This example produces the following output: -``` +```txt Nullable decimal: value=79228162514264337593543950335 ``` @@ -5455,7 +5454,7 @@ Console.WriteLine("Nullable double: value={0}", IIf(value.HasValue, value.ToStri This example produces the following output: -``` +```txt Nullable double: value=1.79769313486231E+308 ``` @@ -5540,7 +5539,7 @@ Console.WriteLine("Nullable Guid: value={0}", IIf(value.HasValue, value.ToString This example produces the following output: -``` +```txt Nullable Guid: value=3c1cc55b-baff-4b7a-9d17-077af3aa5730 ``` @@ -5621,12 +5620,11 @@ Dim root As XElement = _ Dim value As Nullable(Of Integer) = CType(root.Element("Value"), Nullable(Of Integer)) Console.WriteLine("Nullable integer: value={0}", IIf(value.HasValue, value.ToString(), "null")) - ``` This example produces the following output: -``` +```txt Nullable integer: value=2147483647 ``` @@ -5711,7 +5709,7 @@ Console.WriteLine("Nullable ulong: value={0}", IIf(value.HasValue, value.ToStrin This example produces the following output: -``` +```txt Nullable ulong: value=9223372036854775807 ``` @@ -5796,7 +5794,7 @@ Console.WriteLine("Nullable Single: value={0}", IIf(value.HasValue, value.ToStri This example produces the following output: -``` +```txt Nullable Single: value=3.402823E+38 ``` @@ -5886,7 +5884,7 @@ Console.WriteLine("Nullable TimeSpan: value={0}", IIf(value.HasValue, value.ToSt This example produces the following output: -``` +```txt Nullable TimeSpan: value=01:05:30 ``` @@ -5971,7 +5969,7 @@ Console.WriteLine("Nullable uint: value={0}", IIf(value.HasValue, value.ToString This example produces the following output: -``` +```txt Nullable uint: value=4294967295 ``` @@ -6057,7 +6055,7 @@ Console.WriteLine("Nullable ulong: value={0}", IIf(value.HasValue, value.ToStrin This example produces the following output: -``` +```txt Nullable ulong: value=9223372036854775807 ``` @@ -6136,7 +6134,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=3.402823E+38 ``` @@ -6220,7 +6218,7 @@ Console.WriteLine("(string)root={0}", root.Value) This example produces the following output: -``` +```txt (string)root=abc def ghi ``` @@ -6303,7 +6301,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=01:05:30 ``` @@ -6383,7 +6381,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=4294967295 ``` @@ -6463,7 +6461,7 @@ Console.WriteLine("value={0}", value) This example produces the following output: -``` +```txt value=18446744073709551615 ``` @@ -6691,7 +6689,7 @@ Console.WriteLine("Count of white space nodes (preserving whitespace): {0}", whi This example produces the following output: -``` +```txt Count of white space nodes (not preserving whitespace): 0 Count of white space nodes (preserving whitespace): 3 ``` @@ -6749,7 +6747,7 @@ Next This example produces the following output: -``` +```txt Element Name Line Position ------------ ---- -------- Root 1 2 @@ -7010,7 +7008,7 @@ Console.WriteLine(xmlTree) This example produces the following output: -``` +```txt 1 2 @@ -8089,7 +8087,7 @@ End Using This example produces the following output: -``` +```txt Text ===== @@ -8192,7 +8190,7 @@ Console.WriteLine(str) This example produces the following output: -``` +```txt Text ===== @@ -8448,7 +8446,7 @@ Console.WriteLine(root) This example produces the following output: -``` +```txt @@ -8575,7 +8573,7 @@ Console.WriteLine(root) This example produces the following output: -``` +```txt 1 2 @@ -8921,7 +8919,7 @@ Console.WriteLine("{0}", el.Value) This example produces the following output: -``` +```txt This is mixed content ``` diff --git a/xml/System.Xml.Linq/XName.xml b/xml/System.Xml.Linq/XName.xml index fd26bf67cbc..fad7699187a 100644 --- a/xml/System.Xml.Linq/XName.xml +++ b/xml/System.Xml.Linq/XName.xml @@ -255,7 +255,7 @@ End Module This example produces the following output: -``` +```txt content content ``` @@ -355,7 +355,7 @@ End Module This example produces the following output: -``` +```txt content content ``` @@ -495,7 +495,7 @@ End Module This example produces the following output: -``` +```txt {http://www.adventure-works.com}Root Root http://www.adventure-works.com @@ -587,7 +587,7 @@ End Module This example produces the following output: -``` +```txt {http://www.adventure-works.com}Root Root http://www.adventure-works.com @@ -667,7 +667,7 @@ End Module This example produces the following output: -``` +```txt http://www.adventure-works.com ``` @@ -758,7 +758,7 @@ Console.WriteLine(root.Name = "Root") This example produces the following output: -``` +```txt True True True @@ -857,7 +857,7 @@ End Module This example produces the following output: -``` +```txt content content ``` @@ -949,7 +949,7 @@ End Module This example produces the following output: -``` +```txt False False ``` @@ -1133,7 +1133,7 @@ End Module This example produces the following output: -``` +```txt {http://www.adventure-works.com}Root Root http://www.adventure-works.com diff --git a/xml/System.Xml.Linq/XNamespace.xml b/xml/System.Xml.Linq/XNamespace.xml index 25112946bca..1fe0ea60a8a 100644 --- a/xml/System.Xml.Linq/XNamespace.xml +++ b/xml/System.Xml.Linq/XNamespace.xml @@ -134,7 +134,7 @@ End Module This example produces the following output: -``` +```txt True ``` @@ -223,7 +223,7 @@ End Module This example produces the following output: -``` +```txt http://www.adventure-works.com http://www.adventure-works.com ``` @@ -358,7 +358,7 @@ End Module This example produces the following output: -``` +```txt {http://www.adventure-works.com}Root ``` @@ -440,7 +440,7 @@ End Module This example produces the following output: -``` +```txt http://www.adventure-works.com ``` @@ -559,7 +559,7 @@ End Module This example produces the following output: -``` +```txt Root element is in no namespace ChildInNamespace element is in a namespace ChildInNoNamespace element is in no namespace @@ -659,7 +659,7 @@ End Module This example produces the following output: -``` +```txt @@ -743,7 +743,7 @@ End Module This example produces the following output: -``` +```txt True ``` @@ -824,7 +824,7 @@ End Module This example produces the following output: -``` +```txt http://www.adventure-works.com ``` @@ -906,7 +906,7 @@ End Module This example produces the following output: -``` +```txt False ``` @@ -979,7 +979,7 @@ End Module This example produces the following output: -``` +```txt http://www.adventure-works.com ``` @@ -1056,7 +1056,7 @@ Console.WriteLine(root) This example produces the following output: -``` +```txt content @@ -1151,7 +1151,7 @@ End Module This example produces the following output: -``` +```txt content diff --git a/xml/System.Xml.Linq/XProcessingInstruction.xml b/xml/System.Xml.Linq/XProcessingInstruction.xml index 285353713a6..1fade227969 100644 --- a/xml/System.Xml.Linq/XProcessingInstruction.xml +++ b/xml/System.Xml.Linq/XProcessingInstruction.xml @@ -185,7 +185,7 @@ Console.WriteLine(pi) This example produces the following output: -``` +```txt ``` @@ -267,7 +267,7 @@ Console.WriteLine(pi.Data) This example produces the following output: -``` +```txt type='text/xsl' href='hello.xsl' type='text/xsl' href='xform.xsl' ``` @@ -342,7 +342,7 @@ Console.WriteLine(pi.NodeType.ToString) This example produces the following output: -``` +```txt ProcessingInstruction ``` @@ -416,7 +416,7 @@ Console.WriteLine(pi.Target) This example produces the following output: -``` +```txt xml-stylesheet ``` diff --git a/xml/System.Xml.Linq/XStreamingElement.xml b/xml/System.Xml.Linq/XStreamingElement.xml index 6c57ae50a36..15996c6b837 100644 --- a/xml/System.Xml.Linq/XStreamingElement.xml +++ b/xml/System.Xml.Linq/XStreamingElement.xml @@ -124,7 +124,7 @@ Console.WriteLine(dstTree2) This example produces the following output: -``` +```txt 3 4 @@ -142,7 +142,7 @@ Console.WriteLine(dstTree2) The following text file, People.txt, is the source for this example. -``` +```txt #This is a comment 1,Tai,Yee,Writer 2,Nikolay,Grachev,Programmer @@ -593,7 +593,7 @@ Console.WriteLine(dstTree) This example produces the following output: -``` +```txt 3 4 @@ -1161,7 +1161,7 @@ Console.WriteLine(dstTree.Name) This example produces the following output: -``` +```txt NewRoot ``` @@ -1868,7 +1868,7 @@ Console.WriteLine(File.ReadAllText("Test2.xml")) This example produces the following output: -``` +```txt 3 ------ @@ -2001,7 +2001,7 @@ Console.WriteLine(dstTree.ToString()) This example produces the following output: -``` +```txt 3 ------ @@ -2117,7 +2117,7 @@ Console.WriteLine(dstTree.ToString()) This example produces the following output: -``` +```txt 3 ------ diff --git a/xml/System.Xml.Schema/XmlSchemaCollection.xml b/xml/System.Xml.Schema/XmlSchemaCollection.xml index a70eb9b357f..815e79f23fd 100644 --- a/xml/System.Xml.Schema/XmlSchemaCollection.xml +++ b/xml/System.Xml.Schema/XmlSchemaCollection.xml @@ -422,7 +422,7 @@ ## Remarks If `ns` has already been associated with another schema in the collection, the schema being added replaces the original schema in the collection. For example, in the following C# code, authors.xsd is removed from the collection and names.xsd is added. -``` +```csharp schemaColl.Add("urn:author", "authors.xsd"); schemaColl.Add("urn:author", "names.xsd"); ``` diff --git a/xml/System.Xml.Schema/XmlSchemaSet.xml b/xml/System.Xml.Schema/XmlSchemaSet.xml index 5a25ba996bb..3183460fe49 100644 --- a/xml/System.Xml.Schema/XmlSchemaSet.xml +++ b/xml/System.Xml.Schema/XmlSchemaSet.xml @@ -421,7 +421,7 @@ foreach(XmlSchema schema in schemaSet.Schemas("http://www.contoso.com/books")) - W3C XML Schema allows schemas without a target namespace to be included in schemas with a target namespace defined. In this case, the schema without a target namespace defined is coerced into the target namespace of the including schema. The included schema is treated as if it had that target namespace defined. Similarly, schemas without a target namespace can be added to the and coerced into the target namespace specified by the method, as illustrated in the following example. -``` +```xml @@ -1325,7 +1325,7 @@ foreach (XmlSchema schema in schemaSet.Schemas()) If the specified schema imports other schemas and the specified schema was previously removed with the method, the method will not remove the imported schemas and will return `false`. For example, if `parentSchema` imports `childSchema1` and `childSchema2` the following code will only remove `parentSchema`, but not the imported `childSchema1` and `childSchema2` schemas: -``` +```csharp XmlSchemaSet ss = new XmlSchemaSet(); XmlSchema xs = XmlSchema.Read(XmlReader.Create("parentSchema.xsd"), null); ss.Add(xs); @@ -1338,7 +1338,7 @@ ss.Compile(); The following code will remove the `parentSchema` and the imported schemas: -``` +```csharp XmlSchemaSet ss = new XmlSchemaSet(); XmlSchema xs = XmlSchema.Read(XmlReader.Create("parentSchema.xsd"), null); ss.Add(xs); diff --git a/xml/System.Xml.Serialization/XmlAttributeEventArgs.xml b/xml/System.Xml.Serialization/XmlAttributeEventArgs.xml index b31ff71a068..a8caf2b1176 100644 --- a/xml/System.Xml.Serialization/XmlAttributeEventArgs.xml +++ b/xml/System.Xml.Serialization/XmlAttributeEventArgs.xml @@ -62,7 +62,7 @@ ## Examples The following example deserializes a class named `Group` from a file named UnknownAttributes.xml. Whenever an element is found in the file that has no corresponding member in the class, the event occurs. To try the example, paste the following XML code into a file named UnknownAttributes.xml. -``` +```xml MyGroup @@ -128,7 +128,7 @@ ## Examples The following example deserializes a class named `Group` from a file named UnknownAttributes.xml. Whenever an element is found in the file that has no corresponding member in the class, the event occurs. To try the example, paste the following XML code into a file named UnknownAttributes.xml. -``` +```xml MyGroup @@ -235,7 +235,7 @@ ## Examples The following example deserializes a class named `Group` from a file named UnknownAttributes.xml. Whenever an element is found in the file that has no corresponding member in the class, the event occurs. To try the example, paste the following XML code into a file named UnknownAttributes.xml. -``` +```xml MyGroup @@ -300,7 +300,7 @@ ## Examples The following example deserializes a class named `Group` from a file named UnknownAttributes.xml. Whenever an element is found in the file that has no corresponding member in the class, the event occurs. To try the example, paste the following XML code into a file named UnknownAttributes.xml. -``` +```xml MyGroup diff --git a/xml/System.Xml.Serialization/XmlAttributes.xml b/xml/System.Xml.Serialization/XmlAttributes.xml index 81bf60a3266..80c16cb2093 100644 --- a/xml/System.Xml.Serialization/XmlAttributes.xml +++ b/xml/System.Xml.Serialization/XmlAttributes.xml @@ -664,7 +664,7 @@ ## Remarks You can specify the default value of an XML element or XML attribute by applying a to a member. To examine the result of applying the value, compile the application into a DLL or executable, and pass the resulting file as an argument to the XML Schema Definition tool (XSD.exe). In the XML schema document, a default value is assigned to the `default` attribute. In the following example, the default for the \ element is "Dogs." -``` +```xml event occurs. To try the example, paste the following XML code into a file named UnknownElements.xml. -``` +```xml MyGroup @@ -3312,7 +3312,7 @@ The following example contains two main classes: `PurchaseOrder` and `Test`. The Documents that conform to section 5 are in a special format. At the very least, such a document includes the main body of the SOAP message. However, rather than having all types defined inline in the document, some type definitions can be encoded as references to top-level elements in the document. Thus, for every element found in the main body that is a reference, there must be a corresponding element that contains the type definition. To correlate the referencing element and the type definition, the type definition has an `id` attribute set to a unique string ID and the referencing element has an `href` attribute that references the same ID. -``` +```xml 10000 @@ -3331,7 +3331,7 @@ The following example contains two main classes: `PurchaseOrder` and `Test`. The ## Examples The following example adds an to an . The event is handled by the `Serializer``_``UnreferencedObject` method. To run the example, cut and paste the following XML into a file named "UnrefObj.xml". -``` +```xml diff --git a/xml/System.Xml.XPath/XPathNavigator.xml b/xml/System.Xml.XPath/XPathNavigator.xml index f9e40496339..f6d403470ce 100644 --- a/xml/System.Xml.XPath/XPathNavigator.xml +++ b/xml/System.Xml.XPath/XPathNavigator.xml @@ -288,7 +288,6 @@ The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -315,7 +314,6 @@ 9.99 - ``` ]]> @@ -394,7 +392,6 @@ The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -421,7 +418,6 @@ 9.99 - ``` ]]> @@ -490,8 +486,6 @@ - The method does not affect the position of the . - - ## Examples In the following example, a new `pages` child element is appended to the list of child elements of the first `book` element in the `contosoBooks.xml` file using the object specified. The `http://www.contoso.com/books` namespace is specified so that the new child element is appended using the same namespace as the XML document. @@ -502,7 +496,6 @@ The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -529,7 +522,6 @@ 9.99 - ``` ]]> @@ -611,7 +603,6 @@ The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -638,7 +629,6 @@ 9.99 - ``` ]]> @@ -740,7 +730,6 @@ navigator.AppendChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navig The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -767,7 +756,6 @@ navigator.AppendChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navig 9.99 - ``` ]]> @@ -898,7 +886,6 @@ navigator.AppendChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navig The example takes the `books.xml` file as an input. ```xml - @@ -925,7 +912,6 @@ navigator.AppendChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navig 9.99 - ``` ]]> @@ -1090,7 +1076,6 @@ navigator.AppendChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navig 9.99 - ``` ]]> @@ -1334,7 +1319,6 @@ editor.CreateAttribute(navigator.Prefix, "attributeName", LookupNamespace(naviga The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -1361,7 +1345,6 @@ editor.CreateAttribute(navigator.Prefix, "attributeName", LookupNamespace(naviga 9.99 - ``` ]]> @@ -1442,7 +1425,6 @@ editor.CreateAttribute(navigator.Prefix, "attributeName", LookupNamespace(naviga The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -1469,7 +1451,6 @@ editor.CreateAttribute(navigator.Prefix, "attributeName", LookupNamespace(naviga 9.99 - ``` ]]> @@ -1601,7 +1582,6 @@ editor.CreateAttribute(navigator.Prefix, "attributeName", LookupNamespace(naviga The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -1628,7 +1608,6 @@ editor.CreateAttribute(navigator.Prefix, "attributeName", LookupNamespace(naviga 9.99 - ``` ]]> @@ -1708,7 +1687,6 @@ editor.CreateAttribute(navigator.Prefix, "attributeName", LookupNamespace(naviga The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -1735,7 +1713,6 @@ editor.CreateAttribute(navigator.Prefix, "attributeName", LookupNamespace(naviga 9.99 - ``` ]]> @@ -1826,7 +1803,6 @@ nav.Evaluate("Price/text()*10"); The example takes the `books.xml` file as an input. ```xml - @@ -1853,7 +1829,6 @@ nav.Evaluate("Price/text()*10"); 9.99 - ``` ]]> @@ -1943,7 +1918,6 @@ nav.Evaluate(expr); The example takes the `books.xml` file as an input. ```xml - @@ -1970,7 +1944,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -2064,7 +2037,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -2091,7 +2063,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -2184,7 +2155,6 @@ nav.Evaluate(expr); The example takes the `books.xml` file as an input. ```xml - @@ -2211,7 +2181,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -2600,7 +2569,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -2627,7 +2595,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -2710,7 +2677,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -2737,7 +2703,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -2814,7 +2779,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -2841,7 +2805,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -2920,7 +2883,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -2947,7 +2909,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -3027,7 +2988,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -3054,7 +3014,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -3139,7 +3098,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -3166,7 +3124,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -3243,7 +3200,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -3270,7 +3226,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -3349,7 +3304,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -3376,7 +3330,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -3456,7 +3409,6 @@ nav.Evaluate(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -3483,7 +3435,6 @@ nav.Evaluate(expr); 9.99 - ``` ]]> @@ -3583,7 +3534,6 @@ navigator.InsertElementAfter(navigator.Prefix, "pages", LookupNamespaceURI(navig The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -3610,7 +3560,6 @@ navigator.InsertElementAfter(navigator.Prefix, "pages", LookupNamespaceURI(navig 9.99 - ``` ]]> @@ -3709,7 +3658,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -3736,7 +3684,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -4057,7 +4004,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `books.xml` file as an input. ```xml - @@ -4084,7 +4030,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -4372,7 +4317,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example uses the file, `books.xml`, as input. ```xml - @@ -4399,7 +4343,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -4789,7 +4732,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `books.xml` file as an input. ```xml - @@ -4816,7 +4758,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -5136,7 +5077,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -5163,7 +5103,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -5242,7 +5181,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -5269,7 +5207,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -5352,7 +5289,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -5379,7 +5315,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -5469,7 +5404,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -5496,7 +5430,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -5700,7 +5633,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `books.xml` file as an input. ```xml - @@ -5727,7 +5659,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -5919,7 +5850,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `books.xml` file as an input. ```xml - @@ -5946,7 +5876,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -6358,7 +6287,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `books.xml` file as an input. ```xml - @@ -6385,7 +6313,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -6458,7 +6385,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `books.xml` file as an input. ```xml - @@ -6485,7 +6411,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -6612,7 +6537,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `books.xml` file as an input. ```xml - @@ -6639,7 +6563,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -6701,7 +6624,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `books.xml` file as an input. ```xml - @@ -6728,7 +6650,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -6802,7 +6723,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -6829,7 +6749,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -6896,7 +6815,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `books.xml` file as an input. ```xml - @@ -6923,7 +6841,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -7007,7 +6924,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -7034,7 +6950,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -7113,7 +7028,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -7140,7 +7054,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -7221,7 +7134,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -7248,7 +7160,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -7330,7 +7241,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -7357,7 +7267,6 @@ navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -7459,7 +7368,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -7486,7 +7394,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -7567,7 +7474,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -7594,7 +7500,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -7668,7 +7573,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -7695,7 +7599,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -7784,7 +7687,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -7811,7 +7713,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -7892,7 +7793,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -7919,7 +7819,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -8001,7 +7900,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -8028,7 +7926,6 @@ navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navi 9.99 - ``` ]]> @@ -8189,7 +8086,6 @@ while (iterator.MoveNext()) The example takes the `books.xml` file as an input. ```xml - @@ -8216,7 +8112,6 @@ while (iterator.MoveNext()) 9.99 - ``` ]]> @@ -8358,7 +8253,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `books.xml` file as an input. ```xml - @@ -8385,7 +8279,6 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` ]]> @@ -8467,7 +8360,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -8494,7 +8386,6 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` ]]> @@ -8648,7 +8539,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -8675,7 +8565,6 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` ]]> @@ -9060,7 +8949,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `books.xml` file as an input. ```xml - @@ -9087,7 +8975,6 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` ]]> @@ -9166,7 +9053,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `books.xml` file as an input. ```xml - @@ -9193,7 +9079,6 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` ]]> @@ -9278,7 +9163,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -9305,7 +9189,6 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` ]]> @@ -9378,7 +9261,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -9405,7 +9287,6 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` ]]> @@ -9481,7 +9362,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -9508,7 +9388,6 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` ]]> @@ -10251,7 +10130,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -10278,13 +10156,11 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` The example also takes the `contosoBooks.xsd` as an input. ```xml - @@ -10314,7 +10190,6 @@ XPathNodeIterator ni = nav.Select(expr); - ``` ]]> @@ -10400,7 +10275,6 @@ XPathNodeIterator ni = nav.Select(expr); The example takes the `contosoBooks.xml` file as an input. ```xml - @@ -10427,7 +10301,6 @@ XPathNodeIterator ni = nav.Select(expr); 9.99 - ``` ]]> diff --git a/xml/System.Xml.Xsl/XslTransform.xml b/xml/System.Xml.Xsl/XslTransform.xml index 7f4f3816743..877eebc7a3e 100644 --- a/xml/System.Xml.Xsl/XslTransform.xml +++ b/xml/System.Xml.Xsl/XslTransform.xml @@ -1342,9 +1342,9 @@ Console.WriteLine("Passing " + tmpDoc.OuterXml + " to print_root.xsl"); xslt.Transform(tmpDoc, null, Console.Out); ``` - The example uses the `library.xml` and `print_root.xsl` files as input and outputs the following to the console. + The example uses the `library.xml` and `print_root.xsl` files as input, and outputs the following to the console. -``` +```txt Passing Pride And Prejudice to print_root.xsl Root node is book. ``` @@ -1638,9 +1638,9 @@ Console.WriteLine("Passing " + tmpDoc.OuterXml + " to print_root.xsl"); xslt.Transform(tmpDoc, null, Console.Out); ``` - The example uses the `library.xml` and `print_root.xsl` files as input and outputs the following to the console. + The example uses the `library.xml` and `print_root.xsl` files as input, and outputs the following to the console. -``` +```txt Passing Pride And Prejudice to print_root.xsl Root node is book. ``` @@ -1773,9 +1773,9 @@ Console.WriteLine("Passing " + tmpDoc.OuterXml + " to print_root.xsl"); xslt.Transform(tmpDoc, null, Console.Out); ``` - The example uses the `library.xml` and `print_root.xsl` files as input and outputs the following to the console. + The example uses the `library.xml` and `print_root.xsl` files as input, and outputs the following to the console. -``` +```txt Passing Pride And Prejudice to print_root.xsl Root node is book. ``` @@ -1909,9 +1909,9 @@ Console.WriteLine("Passing " + tmpDoc.OuterXml + " to print_root.xsl"); xslt.Transform(tmpDoc, null, Console.Out, null); ``` - The example uses the `library.xml` and `print_root.xsl` files as input and outputs the following to the console. + The example uses the `library.xml` and `print_root.xsl` files as input, and outputs the following to the console. -``` +```txt Passing Pride And Prejudice to print_root.xsl Root node is book. ``` @@ -2049,9 +2049,9 @@ Console.WriteLine("Passing " + tmpDoc.OuterXml + " to print_root.xsl"); xslt.Transform(tmpDoc, null, Console.Out); ``` - The example uses the `library.xml` and `print_root.xsl` files as input and outputs the following to the console. + The example uses the `library.xml` and `print_root.xsl` files as input, and outputs the following to the console. -``` +```txt Passing Pride And Prejudice to print_root.xsl Root node is book. ``` @@ -2527,9 +2527,9 @@ Console.WriteLine("Passing " + tmpDoc.OuterXml + " to print_root.xsl"); xslt.Transform(tmpDoc, null, Console.Out, null); ``` - The example uses the `library.xml` and `print_root.xsl` files as input and outputs the following to the console. + The example uses the `library.xml` and `print_root.xsl` files as input, and outputs the following to the console. -``` +```txt Passing Pride And Prejudice to print_root.xsl Root node is book. ``` @@ -2674,9 +2674,9 @@ Console.WriteLine("Passing " + tmpDoc.OuterXml + " to print_root.xsl"); xslt.Transform(tmpDoc, null, Console.Out, null); ``` - The example uses the `library.xml` and `print_root.xsl` files as input and outputs the following to the console. + The example uses the `library.xml` and `print_root.xsl` files as input, and outputs the following to the console. -``` +```txt Passing Pride And Prejudice to print_root.xsl Root node is book. ``` @@ -2823,9 +2823,9 @@ Console.WriteLine("Passing " + tmpDoc.OuterXml + " to print_root.xsl"); xslt.Transform(tmpDoc, null, Console.Out, null); ``` - The example uses the `library.xml` and `print_root.xsl` files as input and outputs the following to the console. + The example uses the `library.xml` and `print_root.xsl` files as input, and outputs the following to the console. -``` +```txt Passing Pride And Prejudice to print_root.xsl Root node is book. ``` diff --git a/xml/System.Xml/XmlDictionaryWriter.xml b/xml/System.Xml/XmlDictionaryWriter.xml index a1ed562f781..149f05305fa 100644 --- a/xml/System.Xml/XmlDictionaryWriter.xml +++ b/xml/System.Xml/XmlDictionaryWriter.xml @@ -180,7 +180,6 @@ for (int i = 0; i < 10000; i++) binarywriter.WriteValue(largeStr); } binarywriter.WriteEndAttribute(); - ``` In the previous sample the code buffers about 1 GB of memory, while in the other writers it writes the values as they are provided. diff --git a/xml/System.Xml/XmlDocument.xml b/xml/System.Xml/XmlDocument.xml index 8e4ad0b91c1..0f87bcae068 100644 --- a/xml/System.Xml/XmlDocument.xml +++ b/xml/System.Xml/XmlDocument.xml @@ -1108,16 +1108,17 @@ ``` @@ -1200,16 +1201,17 @@ elem=doc.CreateElement("xy:item", "urn:abc"); ``` @@ -1285,17 +1287,11 @@ elem=doc.CreateElement("xy", "item", "urn:abc"); The namespaces used in the replacement text for the entity reference are bound at the time the parent of the entity reference node is first set (for example, when the entity reference node is inserted into the document). For example, given the following entity: -``` +```dtd test"> ``` - If you call `CreateEntityReference("a")` you get back a single node of type EntityReference with no children. If you append this node as a child of the following node, - -``` - -``` - - then, at the time of calling , the parent of the newly created entity reference node is set and the children are expanded in this namespace context. The child element node `b` will have NamespaceURI equal to `urn:1`. The child nodes of the entity reference remain the same even if you move the entity reference to a place in the document that has a different default namespace context. This does not happen for existing entity reference nodes when you remove and insert them or for entity references that you clone with . It only happens for newly created entity references. + If you call `CreateEntityReference("a")`, you get back a single node of type EntityReference with no children. If you append this node as a child of the following node, ``, then, at the time of calling , the parent of the newly created entity reference node is set and the children are expanded in this namespace context. The child element node `b` will have NamespaceURI equal to `urn:1`. The child nodes of the entity reference remain the same even if you move the entity reference to a place in the document that has a different default namespace context. This does not happen for existing entity reference nodes when you remove and insert them or for entity references that you clone with . It only happens for newly created entity references. If the corresponding entity is not defined in the DocumentType when the entity reference node is added, because the entity reference is not defined, its only child node will be an empty text node. @@ -2266,7 +2262,7 @@ elem=doc.CreateElement("xy", "item", "urn:abc"); **Output:** -``` +```xml Pride And Prejudice ``` diff --git a/xml/System.Xml/XmlNamespaceManager.xml b/xml/System.Xml/XmlNamespaceManager.xml index c3e1e15e168..6bc13aef348 100644 --- a/xml/System.Xml/XmlNamespaceManager.xml +++ b/xml/System.Xml/XmlNamespaceManager.xml @@ -720,7 +720,6 @@ Loop ```vb Dim prefix As String = nsMgr.LookupPrefix("urn:samples") writer.WriteStartAttribute(prefix, "ISBN", "urn:samples") - ``` ```csharp @@ -741,12 +740,11 @@ writer.WriteEndElement() s = writer.LookupPrefix("book") CError.Compare(s, Nothing, "Error in root element") writer.WriteEndElement() - ``` **Output** -``` +```xml diff --git a/xml/System.Xml/XmlNode.xml b/xml/System.Xml/XmlNode.xml index 7c8f7937eb1..3a5dd281656 100644 --- a/xml/System.Xml/XmlNode.xml +++ b/xml/System.Xml/XmlNode.xml @@ -165,7 +165,7 @@ **Output:** -``` +```txt Display the modified XML... @@ -336,9 +336,9 @@ Display the modified XML... &xyz; ``` - where the DTD file contains the following: +Where the DTD file contains the following: -``` +```dtd My Data @@ -1081,7 +1081,7 @@ Display the modified XML... **Output:** -``` +```txt Display the InnerText of the element... some textmore text Display the InnerXml of the element... @@ -3235,14 +3235,12 @@ nodeList = root.SelectNodes("//ab:book[contains(ab:title,""'Emma'"")]", nsmgr) The following Visual Basic code selects an element that contains single quotes: -``` +```vb book = root.SelectSingleNode("descendant::book[title=""'Emma'""]") ``` This method is a Microsoft extension to the Document Object Model (DOM). - - ## Examples The following example changes the price of the first Jane Austen book. diff --git a/xml/System.Xml/XmlReader.xml b/xml/System.Xml/XmlReader.xml index 3239e9d131c..6f5ce6beeff 100644 --- a/xml/System.Xml/XmlReader.xml +++ b/xml/System.Xml/XmlReader.xml @@ -2240,7 +2240,7 @@ public class Sample `book.dtd` -``` +```dtd asynchronous method was called without The Meaning of Pizza - ``` ]]> @@ -8720,14 +8719,12 @@ An method was called before a previous asy - ``` ```csharp XmlTextReader reader = newXmlTextReader("sample.xml"); reader.ReadToFollowing("item"); - ``` This method can be called on all node types. @@ -8798,14 +8795,12 @@ reader.ReadToFollowing("item"); - ``` ```csharp XmlTextReader reader = newXmlTextReader("sample.xml"); reader.ReadToFollowing("item", "urn:1"); - ``` This method can be called on all node types. diff --git a/xml/System.Xml/XmlReaderSettings.xml b/xml/System.Xml/XmlReaderSettings.xml index ab3dc214f6f..691ed383a31 100644 --- a/xml/System.Xml/XmlReaderSettings.xml +++ b/xml/System.Xml/XmlReaderSettings.xml @@ -1014,7 +1014,7 @@ End Try This example produces the following output: -``` +```txt There is an error in XML document (MaxCharactersFromEntities, ). ``` @@ -1119,7 +1119,7 @@ End Try This code produces the following output: -``` +```txt There is an error in XML document (MaxCharactersInDocument, ). ``` diff --git a/xml/System.Xml/XmlTextReader.xml b/xml/System.Xml/XmlTextReader.xml index 6aa4d77f4c4..f1d0a82c8d6 100644 --- a/xml/System.Xml/XmlTextReader.xml +++ b/xml/System.Xml/XmlTextReader.xml @@ -1579,7 +1579,7 @@ XmlTextReader reader = new XmlTextReader(s); To illustrate the difference between the entity handling modes consider the following XML: -``` +```xml ]> A # ``` @@ -2512,14 +2512,13 @@ If the reader is positioned on a `DocumentType` node, this method can be used to ## Remarks -> [!NOTE] -> Starting with the .NET Framework 2.0, we recommend that you create instances by using the method to take advantage of new functionality. +> We recommend that you create instances by using the method to take advantage of new functionality. This property is most commonly used for error reporting, but can be called at any time. The property's starting value is `1`. The position indicated is the first character of text in the markup. -``` +```xml abc diff --git a/xml/System.Xml/XmlWriter.xml b/xml/System.Xml/XmlWriter.xml index 02c07da8ac7..d33382fd843 100644 --- a/xml/System.Xml/XmlWriter.xml +++ b/xml/System.Xml/XmlWriter.xml @@ -6306,13 +6306,13 @@ An asynchronous method was called without - The default behavior of an created using is to throw an when attempting to write character values in the range 0x-0x1F (excluding white space characters 0x9, 0xA, and 0xD). These invalid XML characters can be written by creating the with the property set to `false`. Doing so will result in the characters being replaced with numeric character entities (&\#0; through �x1F). Additionally, an created with the `new` operator will replace the invalid characters with numeric character entities by default. - **Note** Microsoft does not encourage the practice of writing invalid XML characters since many applications that consume XML are not designed to handle invalid characters. + **Note** Microsoft does not encourage the practice of writing invalid XML characters, since many applications that consume XML are not designed to handle invalid characters. - If `WriteString` is called in the context of an attribute value, double and single quotes are replaced with `"` and `'` respectively. For example, this input string `testtest` is written out as -``` +```txt test<item>test ``` From cb8853c678e13b3e6156643bfc561ad34f182564 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 23 Apr 2025 19:05:15 -0700 Subject: [PATCH 2/2] Apply suggestions from code review --- xml/System.Xml.Linq/XAttribute.xml | 4 ++-- xml/System.Xml.Linq/XDocument.xml | 6 +++--- xml/System.Xml.Linq/XElement.xml | 2 +- xml/System.Xml.Linq/XNamespace.xml | 6 +++--- xml/System.Xml.Linq/XProcessingInstruction.xml | 2 +- xml/System.Xml.Linq/XStreamingElement.xml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/xml/System.Xml.Linq/XAttribute.xml b/xml/System.Xml.Linq/XAttribute.xml index 667730c444f..ecb196989a1 100644 --- a/xml/System.Xml.Linq/XAttribute.xml +++ b/xml/System.Xml.Linq/XAttribute.xml @@ -3062,7 +3062,7 @@ Console.WriteLine(root) This example produces the following output: -```txt +```xml ``` @@ -3149,7 +3149,7 @@ Console.WriteLine(root) This example produces the following output: -```txt +```xml ``` diff --git a/xml/System.Xml.Linq/XDocument.xml b/xml/System.Xml.Linq/XDocument.xml index 96b9727e8fc..dc4acbd0b0d 100644 --- a/xml/System.Xml.Linq/XDocument.xml +++ b/xml/System.Xml.Linq/XDocument.xml @@ -731,7 +731,7 @@ Console.WriteLine(doc.Declaration) This example produces the following output: -```txt +```xml ``` @@ -1163,7 +1163,7 @@ Console.WriteLine(doc) This example produces the following output: -```txt +```xml
Ellen Adams @@ -3032,7 +3032,7 @@ Console.WriteLine(File.ReadAllText("Root2.xml")) This example produces the following output: -```txt +```xml content diff --git a/xml/System.Xml.Linq/XElement.xml b/xml/System.Xml.Linq/XElement.xml index d268ffed61a..f3ab52dccb1 100644 --- a/xml/System.Xml.Linq/XElement.xml +++ b/xml/System.Xml.Linq/XElement.xml @@ -578,7 +578,7 @@ Console.WriteLine(xse) This example produces the following output: -```txt +```xml 2 3 diff --git a/xml/System.Xml.Linq/XNamespace.xml b/xml/System.Xml.Linq/XNamespace.xml index 1fe0ea60a8a..754ca325b46 100644 --- a/xml/System.Xml.Linq/XNamespace.xml +++ b/xml/System.Xml.Linq/XNamespace.xml @@ -659,7 +659,7 @@ End Module This example produces the following output: -```txt +```xml @@ -1056,7 +1056,7 @@ Console.WriteLine(root) This example produces the following output: -```txt +```xml content @@ -1151,7 +1151,7 @@ End Module This example produces the following output: -```txt +```xml content diff --git a/xml/System.Xml.Linq/XProcessingInstruction.xml b/xml/System.Xml.Linq/XProcessingInstruction.xml index 1fade227969..4b5ec7bff8a 100644 --- a/xml/System.Xml.Linq/XProcessingInstruction.xml +++ b/xml/System.Xml.Linq/XProcessingInstruction.xml @@ -185,7 +185,7 @@ Console.WriteLine(pi) This example produces the following output: -```txt +```xml ``` diff --git a/xml/System.Xml.Linq/XStreamingElement.xml b/xml/System.Xml.Linq/XStreamingElement.xml index 15996c6b837..c533627aece 100644 --- a/xml/System.Xml.Linq/XStreamingElement.xml +++ b/xml/System.Xml.Linq/XStreamingElement.xml @@ -593,7 +593,7 @@ Console.WriteLine(dstTree) This example produces the following output: -```txt +```xml 3 4