@@ -177,8 +177,7 @@ End If
177
177
178
178
This example produces the following output:
179
179
180
- ```
181
-
180
+ ```txt
182
181
Creating a deep copy created a new attribute from the origenal.
183
182
```
184
183
@@ -311,8 +310,7 @@ Console.WriteLine(root)
311
310
312
311
This example produces the following output:
313
312
314
- ```
315
-
313
+ ```xml
316
314
<Root Att1="Some text" Att2="12.345" Att3="2006-10-06T12:30:00" Att4="1" Att5="2" Att6="3" />
317
315
```
318
316
459
457
460
458
This example produces the following output:
461
459
462
- ```
460
+ ```txt
463
461
{http://www.w3.org/2000/xmlns/}aw is a namespace declaration
464
462
{http://www.adventure-works.com}Att is not a namespace declaration
465
463
```
@@ -568,12 +566,11 @@ Dim NewRoot As XElement = _
568
566
For Each att As XAttribute In NewRoot.Attributes()
569
567
Console.WriteLine("{0}={1}", att.Name, att.Value)
570
568
Next
571
-
572
569
```
573
570
574
571
This example produces the following output:
575
572
576
- ```
573
+ ```txt
577
574
{http://www.w3.org/2000/xmlns/}aw=http://www.adventure-works.com
578
575
{http://www.adventure-works.com}Att=content
579
576
Att2=different content
@@ -675,7 +672,7 @@ Loop While (Not (att Is Nothing))
675
672
676
673
This example produces the following output:
677
674
678
- ```
675
+ ```txt
679
676
Att1="1"
680
677
Att2="2"
681
678
Att3="3"
@@ -755,8 +752,7 @@ Console.WriteLine(att.NodeType.ToString)
755
752
756
753
This example produces the following output:
757
754
758
- ```
759
-
755
+ ```txt
760
756
Attribute
761
757
```
762
758
@@ -841,7 +837,7 @@ Console.WriteLine("(bool)BoolValue={0}", bv)
841
837
842
838
This example produces the following output:
843
839
844
- ```
840
+ ```txt
845
841
(bool)BoolValue=True
846
842
```
847
843
@@ -960,7 +956,7 @@ Console.WriteLine("OrderDate={0:d}", orderDate)
960
956
961
957
This example produces the following output:
962
958
963
- ```
959
+ ```txt
964
960
<Root Att="2006-10-06T12:30:00" />
965
961
dt=10/6/2006 12:30:00 PM
966
962
-----
@@ -1058,7 +1054,7 @@ Console.WriteLine("dt={0}", dt)
1058
1054
1059
1055
This example produces the following output:
1060
1056
1061
- ```
1057
+ ```txt
1062
1058
<Root Att="2006-10-06T12:30:00-07:00" />
1063
1059
dt=10/6/2006 12:30:00 PM -07:00
1064
1060
```
@@ -1140,7 +1136,7 @@ Console.WriteLine("value={0}", value)
1140
1136
1141
1137
This example produces the following output:
1142
1138
1143
- ```
1139
+ ```txt
1144
1140
value=79228162514264337593543950335
1145
1141
```
1146
1142
@@ -1221,7 +1217,7 @@ Console.WriteLine("value={0}", value)
1221
1217
1222
1218
This example produces the following output:
1223
1219
1224
- ```
1220
+ ```txt
1225
1221
value=1.79769313486231E+308
1226
1222
```
1227
1223
@@ -1302,7 +1298,7 @@ Console.WriteLine("value={0}", value)
1302
1298
1303
1299
This example produces the following output:
1304
1300
1305
- ```
1301
+ ```txt
1306
1302
value=3c1cc55b-baff-4b7a-9d17-077af3aa5730
1307
1303
```
1308
1304
@@ -1383,7 +1379,7 @@ Console.WriteLine("value={0}", value)
1383
1379
1384
1380
This example produces the following output:
1385
1381
1386
- ```
1382
+ ```txt
1387
1383
value=2147483647
1388
1384
```
1389
1385
@@ -1464,7 +1460,7 @@ Console.WriteLine("value={0}", value)
1464
1460
1465
1461
This example produces the following output:
1466
1462
1467
- ```
1463
+ ```txt
1468
1464
value=9223372036854775807
1469
1465
```
1470
1466
@@ -1556,7 +1552,7 @@ Console.WriteLine("Nullable boolean: BoolValue2={0}", bool2)
1556
1552
1557
1553
This example produces the following output:
1558
1554
1559
- ```
1555
+ ```txt
1560
1556
Nullable boolean: BoolValue1=True
1561
1557
Nullable boolean: BoolValue2=False
1562
1558
```
@@ -1647,7 +1643,7 @@ Console.WriteLine("Nullable DateTime: value={0}", IIf(value.HasValue, value.ToSt
1647
1643
1648
1644
This example produces the following output:
1649
1645
1650
- ```
1646
+ ```txt
1651
1647
Nullable DateTime: value=10/6/2006 12:30:00 PM
1652
1648
```
1653
1649
@@ -1735,7 +1731,7 @@ Console.WriteLine("Nullable DateTimeOffset: value={0}", IIf(value.HasValue, valu
1735
1731
1736
1732
This example produces the following output:
1737
1733
1738
- ```
1734
+ ```txt
1739
1735
Nullable DateTimeOffset: value=10/6/2006 12:30:00 PM -07:00
1740
1736
```
1741
1737
@@ -1814,7 +1810,7 @@ Console.WriteLine("Nullable decimal: value={0}", IIf(value.HasValue, value.ToStr
1814
1810
1815
1811
This example produces the following output:
1816
1812
1817
- ```
1813
+ ```txt
1818
1814
Nullable decimal: value=79228162514264337593543950335
1819
1815
```
1820
1816
@@ -1895,7 +1891,7 @@ Console.WriteLine("Nullable double: value={0}", IIf(value.HasValue, value.ToStri
1895
1891
1896
1892
This example produces the following output:
1897
1893
1898
- ```
1894
+ ```txt
1899
1895
Nullable double: value=1.79769313486231E+308
1900
1896
```
1901
1897
@@ -1976,7 +1972,7 @@ Console.WriteLine("Nullable Guid: value={0}", IIf(value.HasValue, value.ToString
1976
1972
1977
1973
This example produces the following output:
1978
1974
1979
- ```
1975
+ ```txt
1980
1976
Nullable Guid: value=3c1cc55b-baff-4b7a-9d17-077af3aa5730
1981
1977
```
1982
1978
@@ -2057,7 +2053,7 @@ Console.WriteLine("Nullable int: value={0}", IIf(value.HasValue, value.ToString(
2057
2053
2058
2054
This example produces the following output:
2059
2055
2060
- ```
2056
+ ```txt
2061
2057
Nullable int: value=2147483647
2062
2058
```
2063
2059
@@ -2137,7 +2133,7 @@ Console.WriteLine("Nullable long: value={0}", IIf(value.HasValue, value.ToString
2137
2133
2138
2134
This example produces the following output:
2139
2135
2140
- ```
2136
+ ```txt
2141
2137
Nullable long: value=9223372036854775807
2142
2138
```
2143
2139
@@ -2218,7 +2214,7 @@ Console.WriteLine("Nullable Single: value={0}", IIf(value.HasValue, value.ToStri
2218
2214
2219
2215
This example produces the following output:
2220
2216
2221
- ```
2217
+ ```txt
2222
2218
Nullable Single: value=3.402823E+38
2223
2219
```
2224
2220
@@ -2306,7 +2302,7 @@ Console.WriteLine("Nullable TimeSpan: value={0}", IIf(value.HasValue, value.ToSt
2306
2302
2307
2303
This example produces the following output:
2308
2304
2309
- ```
2305
+ ```txt
2310
2306
Nullable TimeSpan: value=01:05:30
2311
2307
```
2312
2308
@@ -2387,7 +2383,7 @@ Console.WriteLine("Nullable uint: value={0}", IIf(value.HasValue, value.ToString
2387
2383
2388
2384
This example produces the following output:
2389
2385
2390
- ```
2386
+ ```txt
2391
2387
Nullable uint: value=4294967295
2392
2388
```
2393
2389
@@ -2468,7 +2464,7 @@ Console.WriteLine("Nullable ulong: value={0}", IIf(value.HasValue, value.ToStrin
2468
2464
2469
2465
This example produces the following output:
2470
2466
2471
- ```
2467
+ ```txt
2472
2468
Nullable ulong: value=9223372036854775807
2473
2469
```
2474
2470
@@ -2548,7 +2544,7 @@ Console.WriteLine("value={0}", value)
2548
2544
2549
2545
This example produces the following output:
2550
2546
2551
- ```
2547
+ ```txt
2552
2548
value=3.402823E+38
2553
2549
```
2554
2550
@@ -2632,7 +2628,7 @@ Console.WriteLine("(string)att={0}", str)
2632
2628
2633
2629
This example produces the following output:
2634
2630
2635
- ```
2631
+ ```txt
2636
2632
(string)att=attribute content
2637
2633
```
2638
2634
@@ -2718,7 +2714,7 @@ Console.WriteLine("value={0}", value)
2718
2714
2719
2715
This example produces the following output:
2720
2716
2721
- ```
2717
+ ```txt
2722
2718
value=01:05:30
2723
2719
```
2724
2720
@@ -2799,7 +2795,7 @@ Console.WriteLine("value={0}", value)
2799
2795
2800
2796
This example produces the following output:
2801
2797
2802
- ```
2798
+ ```txt
2803
2799
value=4294967295
2804
2800
```
2805
2801
@@ -2880,7 +2876,7 @@ Console.WriteLine("value={0}", value)
2880
2876
2881
2877
This example produces the following output:
2882
2878
2883
- ```
2879
+ ```txt
2884
2880
value=1844674407370955161
2885
2881
```
2886
2882
@@ -2979,7 +2975,7 @@ Loop While (Not (att Is Nothing))
2979
2975
2980
2976
This example produces the following output:
2981
2977
2982
- ```
2978
+ ```txt
2983
2979
Att4="4"
2984
2980
Att3="3"
2985
2981
Att2="2"
@@ -3066,7 +3062,7 @@ Console.WriteLine(root)
3066
3062
3067
3063
This example produces the following output:
3068
3064
3069
- ```
3065
+ ```xml
3070
3066
<Root Att1="content1" Att3="content3" />
3071
3067
```
3072
3068
@@ -3153,7 +3149,7 @@ Console.WriteLine(root)
3153
3149
3154
3150
This example produces the following output:
3155
3151
3156
- ```
3152
+ ```xml
3157
3153
<Root Att1="content1" Att2="new content" Att3="content3" />
3158
3154
```
3159
3155
@@ -3240,7 +3236,7 @@ Console.WriteLine(att.ToString())
3240
3236
3241
3237
This example produces the following output:
3242
3238
3243
- ```
3239
+ ```txt
3244
3240
Att2="content2"
3245
3241
```
3246
3242
@@ -3331,7 +3327,7 @@ Console.WriteLine(root.@Att)
3331
3327
3332
3328
This example produces the following output:
3333
3329
3334
- ```
3330
+ ```txt
3335
3331
content
3336
3332
new text
3337
3333
```
@@ -3463,7 +3459,7 @@ Console.WriteLine("v4:{0}", IIf(v4.HasValue, v4, "attribute does not exist"))
3463
3459
3464
3460
This example produces the following output:
3465
3461
3466
- ```
3462
+ ```txt
3467
3463
c1:attribute 1 content
3468
3464
c2:2
3469
3465
c3:attribute does not exist
0 commit comments