-
Notifications
You must be signed in to change notification settings - Fork 8
/
_XDocument4.xml
2387 lines (2359 loc) · 158 KB
/
_XDocument4.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="_XDocument4" FullName="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4">
<TypeSignature Language="C#" Value="public interface _XDocument4 : Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract _XDocument4 implements class Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument, class Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument2, class Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3" />
<TypeSignature Language="DocId" Value="T:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4" />
<TypeSignature Language="VB.NET" Value="Public Interface _XDocument4
Implements _XDocument3" />
<TypeSignature Language="C++ CLI" Value="public interface class _XDocument4 : Microsoft::Office::Interop::InfoPath::SemiTrust::_XDocument3" />
<TypeSignature Language="F#" Value="type _XDocument4 = interface
 interface _XDocument3
 interface _XDocument2
 interface _XDocument" />
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces>
<Interface>
<InterfaceName>Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.Guid("096cd77b-0786-11d1-95fa-0080c78ee3bb")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsDual)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>This type is a wrapper for a COM interface implemented by a coclass that is required by managed code for COM interoperability. To access the members specified by this interface, use the type that wraps the coclass that implements this interface. For information about that type, including usage, remarks, and examples, see<see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" />.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="CloseDocument">
<MemberSignature Language="C#" Value="public void CloseDocument ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CloseDocument() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.CloseDocument" />
<MemberSignature Language="VB.NET" Value="Public Sub CloseDocument ()" />
<MemberSignature Language="C++ CLI" Value="public:
 void CloseDocument();" />
<MemberSignature Language="F#" Value="abstract member CloseDocument : unit -> unit" Usage="_XDocument4.CloseDocument " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.CloseDocument</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(56)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Closes the form.</summary>
<remarks>
<para>Calling the <b>CloseDocument</b> method is equivalent to calling the <see cref="M:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocuments3.Close(System.Object)" /> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocuments3" /> collection.</para>
<para>Because the <b>CloseDocument</b> method is new to Microsoft InfoPath, you must cast the <b>XDocument</b> object to the <b>_XDocument4</b> type to access this method. For more information, see How to: Use Object Model Members That Are Not Compatible with InfoPath 2003.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>CloseDocument</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to close the current form.</para>
<code>_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisDoc.CloseDocument();</code>
<code>Dim thisDoc As _XDocument4 = DirectCast(_
thisXDocument, _XDocument4)
thisDoc.CloseDocument()</code>
</example>
<example>
<para>In the following example, the <b>CloseDocument</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to close the current form.</para>
<code>_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisDoc.CloseDocument();</code>
<code>Dim thisDoc As _XDocument4 = DirectCast(_
thisXDocument, _XDocument4)
thisDoc.CloseDocument()</code>
</example>
</Docs>
</Member>
<Member MemberName="CreateDOM">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument CreateDOM ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument CreateDOM() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.CreateDOM" />
<MemberSignature Language="VB.NET" Value="Public Function CreateDOM () As IXMLDOMDocument" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::Office::Interop::InfoPath::SemiTrust::IXMLDOMDocument ^ CreateDOM();" />
<MemberSignature Language="F#" Value="abstract member CreateDOM : unit -> Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument" Usage="_XDocument4.CreateDOM " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.CreateDOM</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(48)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a new instance of the XML Document Object Model (DOM) in memory.</summary>
<returns>An <b>IXMLDOMDocument</b> that can be accessed from a new instance of the XML Document Object Model (DOM).</returns>
<remarks>
<para>Using the <b>CreateDOM</b> method to create an instance of the XML DOM is equivalent to using the following method of creating a Microsoft XML Core Services (MSXML) 5.0 <b>DOMDocument</b> object:</para>
<code>var objDoc = new ActiveXObject("Msxml2.DOMDocument.5.0");</code>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para>
<b>Note</b>: When automating InfoPath, the <b>setProperty</b> method of the <b>IXMLDOMDocument2</b> object may fail for secondary data sources. To use the <b>setProperty</b> method, follow this example:</para>
<code>IXMLDOMDocument3 myDocument = (IXMLDOMDocument3) thisXDocument.<span class="label">CreateDOM</span>();
myDocument.setProperty("SelectionNameSpaces",namespaceString);</code>
<para />
</remarks>
<example>
<code>// create a new XMLDOMDocument that can be used by InfoPath
IXMLDOMDocument newDOM = thisXDocument.<span class="label">CreateDOM</span>();
// Get one node from the main DOM and add it to the new DOM
IXMLDOMNode referenceNode = thisXDocument.DOM.selectSingleNode("//my:group1");
newDOM.appendChild(referenceNode);
// create a new node that will be added to the new DOM
IXMLDOMNode newNode = newDOM.createNode(1,"my:Group2",referenceNode.namespaceURI);
// Set its value
newNode.text = "this is a group2 node";
// Set the SelectionNamespaces attribute with the namespace used in the new DOM
((IXMLDOMDocument3)newDOM).setProperty("SelectionNamespaces","xmlns:my='" + referenceNode.namespaceURI + "'");
// Select one mode from the new DOM and add the new Node as its child
IXMLDOMNode parentNode = newDOM.selectSingleNode("//my:group1");
parentNode.appendChild(newNode);</code>
</example>
<example>
<code>// create a new XMLDOMDocument that can be used by InfoPath
IXMLDOMDocument newDOM = thisXDocument.<span class="label">CreateDOM</span>();
// Get one node from the main DOM and add it to the new DOM
IXMLDOMNode referenceNode = thisXDocument.DOM.selectSingleNode("//my:group1");
newDOM.appendChild(referenceNode);
// create a new node that will be added to the new DOM
IXMLDOMNode newNode = newDOM.createNode(1,"my:Group2",referenceNode.namespaceURI);
// Set its value
newNode.text = "this is a group2 node";
// Set the SelectionNamespaces attribute with the namespace used in the new DOM
((IXMLDOMDocument3)newDOM).setProperty("SelectionNamespaces","xmlns:my='" + referenceNode.namespaceURI + "'");
// Select one mode from the new DOM and add the new Node as its child
IXMLDOMNode parentNode = newDOM.selectSingleNode("//my:group1");
parentNode.appendChild(newNode);</code>
</example>
</Docs>
</Member>
<Member MemberName="DataAdapters">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.SemiTrust.DataAdaptersCollection DataAdapters { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Office.Interop.InfoPath.SemiTrust.DataAdaptersCollection DataAdapters" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.DataAdapters" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DataAdapters As DataAdaptersCollection" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::Office::Interop::InfoPath::SemiTrust::DataAdaptersCollection ^ DataAdapters { Microsoft::Office::Interop::InfoPath::SemiTrust::DataAdaptersCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DataAdapters : Microsoft.Office.Interop.InfoPath.SemiTrust.DataAdaptersCollection" Usage="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.DataAdapters" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.DataAdapters</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(42)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.SemiTrust.DataAdaptersCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.DataAdaptersCollection" /> collection that is associated with a Microsoft InfoPath form.</summary>
<value>To be added.</value>
<remarks>
<para>To use the object returned by a <b>DataAdaptersCollection</b> object, you must declare and cast to the corresponding type for the kind of data connection that is defined in the form template using the Data Connections command on the Data tab. For example, to work with a data connection to a SharePoint list, you must declare and cast the object returned from the <b>DataAdaptersCollection</b> object to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.SharepointListAdapterObject" /> type as shown in the code sample.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>DataAdapters</b> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to set a reference to a data connection to a SharePoint list called "Contacts".</para>
<code>SharepointListAdapterObject myContacts =
(SharepointListAdapterObject)thisXDocument.<span class="label">DataAdapters</span>["Contacts"];</code>
<code>Dim myContacts As SharepointListAdapterObject = _
DirectCast(_
thisXDocument.<span class="label">DataAdapters</span>["Contacts"], _
SharepointListAdapterObject)</code>
</example>
<example>
<para>In the following example, the <b>DataAdapters</b> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to set a reference to a data connection to a SharePoint list called "Contacts".</para>
<code>SharepointListAdapterObject myContacts =
(SharepointListAdapterObject)thisXDocument.<span class="label">DataAdapters</span>["Contacts"];</code>
<code>Dim myContacts As SharepointListAdapterObject = _
DirectCast(_
thisXDocument.<span class="label">DataAdapters</span>["Contacts"], _
SharepointListAdapterObject)</code>
</example>
</Docs>
</Member>
<Member MemberName="DataObjects">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.SemiTrust.DataObjectsCollection DataObjects { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Office.Interop.InfoPath.SemiTrust.DataObjectsCollection DataObjects" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.DataObjects" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DataObjects As DataObjectsCollection" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::Office::Interop::InfoPath::SemiTrust::DataObjectsCollection ^ DataObjects { Microsoft::Office::Interop::InfoPath::SemiTrust::DataObjectsCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DataObjects : Microsoft.Office.Interop.InfoPath.SemiTrust.DataObjectsCollection" Usage="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.DataObjects" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.DataObjects</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(18)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.SemiTrust.DataObjectsCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.DataObjectsCollection" /> collection that is associated with a Microsoft InfoPath form.</summary>
<value>To be added.</value>
<remarks>
<para>The <b>DataObjects</b> collection provides programmatic access to a form's secondary data sources. Each secondary data source is contained in a <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.DataSourceObject" /> object within the <b>DataObjects</b> collection.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>DataObjects</b> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to set a reference to the "CityList" secondary data source:</para>
<code>DataSourceObject myDataObject =
(DataSourceObject)thisXDocument.<span class="label">DataObjects</span>["CityList"];</code>
<code>Dim myDataObject As DataSourceObject = _
DirectCast(thisXDocument.<span class="label">DataObjects</span>["CityList"], DataSourceObject)</code>
<para>In the following example, implemented as an <see cref="E:Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_Event.OnClick" /> event handler for a button on a form, the <b>DataObjects</b> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to set a reference to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.DataObjectsCollection" /> collection. The code then loops through the collection and displays the positional index and name of each <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.DataSourceObject" /> object that it contains:</para>
<code>[InfoPathEventHandler(MatchPath="ShowDataObjectNames", EventType=InfoPathEventType.OnClick)]
public void ShowDataObjectNames_OnClick(DocActionEvent e)
{
// Set a reference to the DataObjects collection.
DataObjectsCollection dataObjects = thisXDocument.<span class="label">DataObjects</span>;
// Loop through the collection and display the name
// of each DataObject object that it contains.
for (int i=0; i &lt; dataObjects.Count; i++)
{
thisXDocument.UI.Alert("Data object " + i + ": " +
dataObjects[i].Name);
}
}</code>
</example>
<example>
<para>In the following example, the <b>DataObjects</b> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to set a reference to the "CityList" secondary data source:</para>
<code>DataSourceObject myDataObject =
(DataSourceObject)thisXDocument.<span class="label">DataObjects</span>["CityList"];</code>
<code>Dim myDataObject As DataSourceObject = _
DirectCast(thisXDocument.<span class="label">DataObjects</span>["CityList"], DataSourceObject)</code>
<para>In the following example, implemented as an <see cref="E:Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_Event.OnClick" /> event handler for a button on a form, the <b>DataObjects</b> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to set a reference to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.DataObjectsCollection" /> collection. The code then loops through the collection and displays the positional index and name of each <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.DataSourceObject" /> object that it contains:</para>
<code>[InfoPathEventHandler(MatchPath="ShowDataObjectNames", EventType=InfoPathEventType.OnClick)]
public void ShowDataObjectNames_OnClick(DocActionEvent e)
{
// Set a reference to the DataObjects collection.
DataObjectsCollection dataObjects = thisXDocument.<span class="label">DataObjects</span>;
// Loop through the collection and display the name
// of each DataObject object that it contains.
for (int i=0; i &lt; dataObjects.Count; i++)
{
thisXDocument.UI.Alert("Data object " + i + ": " +
dataObjects[i].Name);
}
}</code>
</example>
</Docs>
</Member>
<Member MemberName="DOM">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument DOM { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument DOM" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.DOM" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DOM As IXMLDOMDocument" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::Office::Interop::InfoPath::SemiTrust::IXMLDOMDocument ^ DOM { Microsoft::Office::Interop::InfoPath::SemiTrust::IXMLDOMDocument ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DOM : Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument" Usage="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.DOM" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.DOM</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(8)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to a form's underlying XML document in the form of an XML Document Object Model (DOM).</summary>
<value>To be added.</value>
<remarks>
<para>A key property of the <b>XDocument</b> object, the <b>DOM</b> property allows you to programmatically access and manipulate the source XML of a form. After you have set a reference to the XML DOM, which contains the source XML data of a form, you can use any of the properties and methods that are supported by the XML DOM.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<code>// Retrieve the Employees Adapter from the DataAdapters collection.
ADOAdapter employeesDA =
(ADOAdapter)thisXDocument.DataAdapters["Employees"];
// Get employee’s ID from the main DOM
string employeeID =
thisXDocument.<span class="label">DOM</span>.selectSingleNode("//my:field2").text;
// Change the ADOAdapter’s command to retrieve the record
// of the Employee's ID entered by the user
employeesDA.Command =
"select * from Employees where EmployeeID="+employeeID;
// Get DataObject from the DataObjects collection and
// call Query to refresh the data object.
DataSourceObject employeesDO =
(DataSourceObject)thisXDocument.DataObjects["Employees"];
employeesDO.Query();</code>
</example>
<example>
<code>// Retrieve the Employees Adapter from the DataAdapters collection.
ADOAdapter employeesDA =
(ADOAdapter)thisXDocument.DataAdapters["Employees"];
// Get employee’s ID from the main DOM
string employeeID =
thisXDocument.<span class="label">DOM</span>.selectSingleNode("//my:field2").text;
// Change the ADOAdapter’s command to retrieve the record
// of the Employee's ID entered by the user
employeesDA.Command =
"select * from Employees where EmployeeID="+employeeID;
// Get DataObject from the DataObjects collection and
// call Query to refresh the data object.
DataSourceObject employeesDO =
(DataSourceObject)thisXDocument.DataObjects["Employees"];
employeesDO.Query();</code>
</example>
</Docs>
</Member>
<Member MemberName="Errors">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.SemiTrust.ErrorsCollection Errors { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Office.Interop.InfoPath.SemiTrust.ErrorsCollection Errors" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.Errors" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Errors As ErrorsCollection" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::Office::Interop::InfoPath::SemiTrust::ErrorsCollection ^ Errors { Microsoft::Office::Interop::InfoPath::SemiTrust::ErrorsCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Errors : Microsoft.Office.Interop.InfoPath.SemiTrust.ErrorsCollection" Usage="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.Errors" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.Errors</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(10)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.SemiTrust.ErrorsCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.ErrorsCollection" /> that is associated with a Microsoft InfoPath form.</summary>
<value>To be added.</value>
<remarks>
<para>The <b>Errors</b> collection is associated with a form's underlying XML document so that when an error occurs, it occurs within the XML document. After you set a reference to the <b>Errors</b> collection, you can access all of its properties and methods for managing the errors within an InfoPath form.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>Errors</b> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to return the count of the number or errors and then display that value in a message box:</para>
<code>int errors;
errors = thisXDocument.<span class="label">Errors</span>.Count;
thisXDocument.UI.Alert("Total number of errors: " + errors);</code>
</example>
<example>
<para>In the following example, the <b>Errors</b> property of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to return the count of the number or errors and then display that value in a message box:</para>
<code>int errors;
errors = thisXDocument.<span class="label">Errors</span>.Count;
thisXDocument.UI.Alert("Total number of errors: " + errors);</code>
</example>
</Docs>
</Member>
<Member MemberName="Extension">
<MemberSignature Language="C#" Value="public object Extension { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Extension" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.Extension" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Extension As Object" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Object ^ Extension { System::Object ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Extension : obj" Usage="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.Extension" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.Extension</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(11)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the global scripting object, which exposes the functions and global variables contained in a Microsoft InfoPath form's primary form code file.</summary>
<value>To be added.</value>
<remarks>
<para>The <b>Extension</b> object facilitates using the functions and global variables implemented in an InfoPath form's scripting file. Usually, it is used from a custom task pane, from a custom dialog box, or in the XSL Transformation (XSLT) of a view where direct access to the functions and variables may be needed.</para>
<para>To use the <b>Extension</b> object within a custom task pane, you must first set a reference to the <b>XDocument</b> object by using the Dynamic HTML (DHTML) <b>external</b> property of the DHTML <b>window</b> object, as shown in this example:</para>
<code>objXDocument = window.external.XDocument;</code>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>Extension</b> property is used through the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.ObjectWrapper" /> interface to invoke the custom method called <paramref name="MyMethod" />. This is necessary when using the <b>Extension</b> property in managed code:</para>
<code>ObjectWrapper o = (ObjectWrapper)thisApplication.XDocuments[0].<span class="label">Extension</span>;
o.GetType().InvokeMember("MyMethod",
BindingFlags.InvokeMethod |
BindingFlags.DeclaredOnly |
BindingFlags.Public |
BindingFlags.Instance, null, o, null);</code>
<para>In the following example, a method called <paramref name="myCustomMethod" /> of the InfoPath project class can be accessed from the custom task pane using the <b>Extension</b> property:</para>
<code>//Custom method added to the project
public string myCustomMethod()
{
return "Method value";
}</code>
<para>To access <paramref name="myCustomMethod" /> from the custom task pane, use the DHTML <b>external</b> property of the DHTML <b>window</b> object:</para>
<code>objXDocument = window.external.XDocument;
myString = objXDocument.<span class="label">Extension</span>.myCustomMethod();</code>
</example>
<example>
<para>In the following example, the <b>Extension</b> property is used through the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.ObjectWrapper" /> interface to invoke the custom method called <paramref name="MyMethod" />. This is necessary when using the <b>Extension</b> property in managed code:</para>
<code>ObjectWrapper o = (ObjectWrapper)thisApplication.XDocuments[0].<span class="label">Extension</span>;
o.GetType().InvokeMember("MyMethod",
BindingFlags.InvokeMethod |
BindingFlags.DeclaredOnly |
BindingFlags.Public |
BindingFlags.Instance, null, o, null);</code>
<para>In the following example, a method called <paramref name="myCustomMethod" /> of the InfoPath project class can be accessed from the custom task pane using the <b>Extension</b> property:</para>
<code>//Custom method added to the project
public string myCustomMethod()
{
return "Method value";
}</code>
<para>To access <paramref name="myCustomMethod" /> from the custom task pane, use the DHTML <b>external</b> property of the DHTML <b>window</b> object:</para>
<code>objXDocument = window.external.XDocument;
myString = objXDocument.<span class="label">Extension</span>.myCustomMethod();</code>
</example>
</Docs>
</Member>
<Member MemberName="GetDataVariable">
<MemberSignature Language="C#" Value="public string GetDataVariable (int lVariableNumber);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string GetDataVariable(int32 lVariableNumber) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.GetDataVariable(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetDataVariable (lVariableNumber As Integer) As String" />
<MemberSignature Language="C++ CLI" Value="public:
 System::String ^ GetDataVariable(int lVariableNumber);" />
<MemberSignature Language="F#" Value="abstract member GetDataVariable : int -> string" Usage="_XDocument4.GetDataVariable lVariableNumber" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.GetDataVariable(System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(22)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="lVariableNumber" Type="System.Int32" />
</Parameters>
<Docs>
<param name="lVariableNumber">The number of the variable.</param>
<summary>Gets the value of the specified variable, which is a predefined variable stored as a processing instruction attribute in the form's underlying XML document.</summary>
<returns>The value of the specified variable, which is a predefined variable stored as a processing instruction attribute in the form's underlying XML document.</returns>
<remarks>
<para>If the variable is not defined or is empty, the <b>GetDataVariable</b> method will return an empty string. To set a variable, use the <see cref="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.SetDataVariable(System.Int32,System.String)" /> method.</para>
<para>
<b>Note</b>: InfoPath only supports using the <paramref name="initialView" /> variable, which is the variable used to specify the initial view displayed when a form is opened. The number of this variable is always 1, and its value must be the name of a view within the form.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>GetDataVariable</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to return the value of the first variable:</para>
<code>string variable1;
variable1= thisXDocument.<span class="label">GetDataVariable</span>(1);</code>
</example>
<example>
<para>In the following example, the <b>GetDataVariable</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to return the value of the first variable:</para>
<code>string variable1;
variable1= thisXDocument.<span class="label">GetDataVariable</span>(1);</code>
</example>
</Docs>
</Member>
<Member MemberName="GetDOM">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument GetDOM (string bstrName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument GetDOM(string bstrName) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.GetDOM(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function GetDOM (bstrName As String) As IXMLDOMDocument" />
<MemberSignature Language="C++ CLI" Value="public:
 Microsoft::Office::Interop::InfoPath::SemiTrust::IXMLDOMDocument ^ GetDOM(System::String ^ bstrName);" />
<MemberSignature Language="F#" Value="abstract member GetDOM : string -> Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument" Usage="_XDocument4.GetDOM bstrName" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.GetDOM(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(24)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bstrName" Type="System.String" />
</Parameters>
<Docs>
<param name="bstrName">The name of a <b>DataObject</b> object</param>
<summary>Gets a reference to the XML Document Object Model (DOM) of the specified <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.DataSourceObject" /> object associated with the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object.</summary>
<returns>An <b>IXMLDOMDocument</b> of the XML Document Object Model (DOM) of the specified <b>DataObject</b> object associated with the <b>XDocument</b> object.</returns>
<remarks>
<para>After you have a reference to the XML DOM that the <b>GetDOM</b> method returns, you can use any of the properties and methods that the XML DOM supports to manipulate the data that the DOM contains.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>GetDOM</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to set a reference to the XML DOM that it returns, which in this case is the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.DataSourceObject" /></para>
<para>object named "CityDropDownList":</para>
<code>IXMLDOMDocument city = thisXDocument.<span class="label">GetDOM</span>("CityDropDownList");</code>
</example>
</Docs>
</Member>
<Member MemberName="GetNamedNodeProperty">
<MemberSignature Language="C#" Value="public string GetNamedNodeProperty (object varMainDOMNode, string bstrPropertyName, string bstrDefaultValue);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string GetNamedNodeProperty(object varMainDOMNode, string bstrPropertyName, string bstrDefaultValue) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.GetNamedNodeProperty(System.Object,System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function GetNamedNodeProperty (varMainDOMNode As Object, bstrPropertyName As String, bstrDefaultValue As String) As String" />
<MemberSignature Language="C++ CLI" Value="public:
 System::String ^ GetNamedNodeProperty(System::Object ^ varMainDOMNode, System::String ^ bstrPropertyName, System::String ^ bstrDefaultValue);" />
<MemberSignature Language="F#" Value="abstract member GetNamedNodeProperty : obj * string * string -> string" Usage="_XDocument4.GetNamedNodeProperty (varMainDOMNode, bstrPropertyName, bstrDefaultValue)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.GetNamedNodeProperty(System.Object,System.String,System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(43)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="varMainDOMNode" Type="System.Object" />
<Parameter Name="bstrPropertyName" Type="System.String" />
<Parameter Name="bstrDefaultValue" Type="System.String" />
</Parameters>
<Docs>
<param name="varMainDOMNode">An XML node corresponding to a <b>nonattribute</b> node in the main data source, for which a named property is to be returned.</param>
<param name="bstrPropertyName">Specifies the name of the property whose value is to be returned.</param>
<param name="bstrDefaultValue">Specifies the default value to be returned if the property has not been set.</param>
<summary>Gets the value of a named property for the specified XML node, which must be a <b>nonattribute</b> node in the main data source.</summary>
<returns>The named property for the specified XML node, which must be a <b>nonattribute</b> node in the main data source.</returns>
<remarks>
<para>Named properties allow users to associate strings with user-defined properties of XML element nodes in the main data source. The value of a named property can be set by using the <see cref="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.SetNamedNodeProperty(Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode,System.String,System.String)" /> method. Use the <b>GetNamedNodeProperty</b> method to read the value of a named property.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>The following example demonstrates setting and getting the value of a named property (with the name "cost") of an XML node (called "item"):</para>
<code>IXMLDOMNode item = thisXDocument.DOM.selectSingleNode(@"/items/item");
string test = thisXDocument.<span class="label">GetNamedNodeProperty</span>(item, 'cost', 'Value not set');
// The value of the "cost" named property is set to 100.
thisXDocument.SetNamedNodeProperty(item, "cost", "100");
test = thisXDocument.GetNamedNodeProperty(item, "cost", "Value not set");</code>
<para>In the following XSL example, the "cost" named property of the item node is displayed:</para>
<code>&lt;xsl:value-of select="xdXDocument:<span class="label">GetNamedNodeProperty</span>(item, 'cost', 'empty')"/&gt;</code>
</example>
<example>
<para>The following example demonstrates setting and getting the value of a named property (with the name "cost") of an XML node (called "item"):</para>
<code>IXMLDOMNode item = thisXDocument.DOM.selectSingleNode(@"/items/item");
string test = thisXDocument.<span class="label">GetNamedNodeProperty</span>(item, 'cost', 'Value not set');
// The value of the "cost" named property is set to 100.
thisXDocument.SetNamedNodeProperty(item, "cost", "100");
test = thisXDocument.GetNamedNodeProperty(item, "cost", "Value not set");</code>
<para>In the following XSL example, the "cost" named property of the item node is displayed:</para>
<code>&lt;xsl:value-of select="xdXDocument:<span class="label">GetNamedNodeProperty</span>(item, 'cost', 'empty')"/&gt;</code>
</example>
</Docs>
</Member>
<Member MemberName="GetWorkflowTasks">
<MemberSignature Language="C#" Value="public object GetWorkflowTasks ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object GetWorkflowTasks() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.GetWorkflowTasks" />
<MemberSignature Language="VB.NET" Value="Public Function GetWorkflowTasks () As Object" />
<MemberSignature Language="C++ CLI" Value="public:
 System::Object ^ GetWorkflowTasks();" />
<MemberSignature Language="F#" Value="abstract member GetWorkflowTasks : unit -> obj" Usage="_XDocument4.GetWorkflowTasks " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.GetWorkflowTasks</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(52)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a reference to a <b>Microsoft.Office.Core.WorkflowTasks</b> collection for the current form.</summary>
<returns>A <b>Microsoft.Office.Core.WorkflowTasks</b> collection that contains any <b>Microsoft.Office.Core.WorkflowTask</b> objects for the current form.</returns>
<remarks>
<para>
<b>Important</b>: For the <b>GetWorkFlowTasks</b> method to work, you must establish a reference to the Microsoft Office 14.0 Object Library (from the COM tab of the Add Reference dialog box in Visual Studio 2012). This will establish a reference to the <b>Microsoft.Office.Core</b> namespace, which contains the <b>WorkflowTasks</b> class.</para>
<para>Because the <b>GetWorkflowTasks</b> method is new to Microsoft InfoPath, you must declare and cast to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4" /> type to access this method. For more information, see How to: Use Object Model Members That Are Not Compatible with InfoPath 2003.</para>
<para>
<b>Important</b>: This member can be accessed only by forms opened from a form template that has been configured to run with full trust using the Security and Trust category of the Form Options dialog box. This member requires full trust for the immediate caller and cannot be used by partially trusted code. For more information, see "Using Libraries from Partially Trusted Code" on MSDN.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>GetWorkflowTasks</b> method is used to display the count of workflow tasks associated with the current form.</para>
<para>This example requires a <b>using</b> or <b>Imports</b> directive for the <b>Microsoft.Office.Core</b> namespace in the declarations section of the form code module.</para>
<code>_XDocument4 thisDoc = (_XDocument4)thisXDocument;
WorkflowTasks myWorkflowTasks =
(WorkflowTasks)thisDoc.GetWorkflowTasks();
int workflowTasksCount = myWorkflowTasks.Count;
thisXDocument.UI.Alert("Get " + workflowTasksCount.ToString() + "
workflow tasks.");</code>
<code>Dim thisDoc As _XDocument4 = DirectCast(_
thisXDocument, _XDocument4)
Dim myWorkflowTasks As WorkflowTasks = _
DirectCast(thisDoc.GetWorkflowTasks(), WorkflowTasks)
Dim workflowTasksCount As Integer = myWorkflowTasks.Count
thisXDocument.UI.Alert("Get " &amp; workflowTasksCount.ToString() &amp; " _
workflow tasks.")</code>
</example>
<example>
<para>In the following example, the <b>GetWorkflowTasks</b> method is used to display the count of workflow tasks associated with the current form.</para>
<para>This example requires a <b>using</b> or <b>Imports</b> directive for the <b>Microsoft.Office.Core</b> namespace in the declarations section of the form code module.</para>
<code>_XDocument4 thisDoc = (_XDocument4)thisXDocument;
WorkflowTasks myWorkflowTasks =
(WorkflowTasks)thisDoc.GetWorkflowTasks();
int workflowTasksCount = myWorkflowTasks.Count;
thisXDocument.UI.Alert("Get " + workflowTasksCount.ToString() + "
workflow tasks.");</code>
<code>Dim thisDoc As _XDocument4 = DirectCast(_
thisXDocument, _XDocument4)
Dim myWorkflowTasks As WorkflowTasks = _
DirectCast(thisDoc.GetWorkflowTasks(), WorkflowTasks)
Dim workflowTasksCount As Integer = myWorkflowTasks.Count
thisXDocument.UI.Alert("Get " &amp; workflowTasksCount.ToString() &amp; " _
workflow tasks.")</code>
</example>
</Docs>
</Member>
<Member MemberName="GetWorkflowTemplates">
<MemberSignature Language="C#" Value="public object GetWorkflowTemplates ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object GetWorkflowTemplates() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.GetWorkflowTemplates" />
<MemberSignature Language="VB.NET" Value="Public Function GetWorkflowTemplates () As Object" />
<MemberSignature Language="C++ CLI" Value="public:
 System::Object ^ GetWorkflowTemplates();" />
<MemberSignature Language="F#" Value="abstract member GetWorkflowTemplates : unit -> obj" Usage="_XDocument4.GetWorkflowTemplates " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.GetWorkflowTemplates</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(53)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a reference to a <b>Microsoft.Office.Core.WorkflowTemplates</b> collection for the current form.</summary>
<returns>A <b>Microsoft.Office.Core.WorkflowTemplates</b> collection that contains any <b>Microsoft.Office.Core.WorkflowTemplate</b> objects for the current form.</returns>
<remarks>
<para>
<b>Important</b>: For the <b>GetWorkFlowTemplates</b> method to work, you must establish a reference to the Microsoft Office 14.0 Object Library (from the COM tab of the Add Reference dialog box in Visual Studio 2012). This will establish a reference to the <b>Microsoft.Office.Core</b> namespace, which contains the <b>WorkflowTemplates</b> class.</para>
<para>Because the <b>GetWorkflowTasks</b> method is new to Microsoft InfoPath, you must declare and cast to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4" /> type to access this method. For more information, see How to: Use Object Model Members That Are Not Compatible with InfoPath 2003.</para>
<para>
<b>Important</b>: This member can be accessed only by forms opened from a form template that has been configured to run with full trust using the Security and Trust category of the Form Options dialog box. This member requires full trust for the immediate caller and cannot be used by partially trusted code. For more information, see "Using Libraries from Partially Trusted Code" on MSDN.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>GetWorkflowTemplates</b> method is used to display the count of workflow templates associated with the current form.</para>
<para>This example requires a <b>using</b> or <b>Imports</b> directive for the <b>Microsoft.Office.Core</b> namespace in the declarations section of the form code module.</para>
<code>_XDocument4 thisDoc = (_XDocument4)thisXDocument;
WorkflowTemplates myWorkflowTemplates =
(WorkflowTemplates)thisDoc.GetWorkflowTemplates();
int workflowTemplatesCount = myWorkflowTemplates.Count;
thisXDocument.UI.Alert("Get " + workflowTemplatesCount.ToString() + "
workflow templates.");</code>
<code>Dim thisDoc As _XDocument4 = DirectCast(_
thisXDocument, _XDocument4)
Dim myWorkflowTemplates As WorkflowTemplates = _
DirectCast(thisDoc.GetWorkflowTemplates(), WorkflowTemplates)
Dim workflowTemplatesCount As Integer = myWorkflowTemplates.Count
thisXDocument.UI.Alert("Get " &amp; workflowTemplatesCount.ToString() &amp; " _
workflow templates.")</code>
</example>
<example>
<para>In the following example, the <b>GetWorkflowTemplates</b> method is used to display the count of workflow templates associated with the current form.</para>
<para>This example requires a <b>using</b> or <b>Imports</b> directive for the <b>Microsoft.Office.Core</b> namespace in the declarations section of the form code module.</para>
<code>_XDocument4 thisDoc = (_XDocument4)thisXDocument;
WorkflowTemplates myWorkflowTemplates =
(WorkflowTemplates)thisDoc.GetWorkflowTemplates();
int workflowTemplatesCount = myWorkflowTemplates.Count;
thisXDocument.UI.Alert("Get " + workflowTemplatesCount.ToString() + "
workflow templates.");</code>
<code>Dim thisDoc As _XDocument4 = DirectCast(_
thisXDocument, _XDocument4)
Dim myWorkflowTemplates As WorkflowTemplates = _
DirectCast(thisDoc.GetWorkflowTemplates(), WorkflowTemplates)
Dim workflowTemplatesCount As Integer = myWorkflowTemplates.Count
thisXDocument.UI.Alert("Get " &amp; workflowTemplatesCount.ToString() &amp; " _
workflow templates.")</code>
</example>
</Docs>
</Member>
<Member MemberName="Host">
<MemberSignature Language="C#" Value="public object Host { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Host" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.Host" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Host As Object" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Object ^ Host { System::Object ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Host : obj" Usage="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.Host" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.Host</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(51)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <b>System.Object</b> that code running in a hosted instance of InfoPath can use to access the object model of the host application.</summary>
<value>A <b>System.Object</b> that represents the method defined in the host application for accessing that application's object model.</value>
<remarks>
<para>This property is only used for scenarios where InfoPath is hosted as a control in another application and code running in InfoPath needs to access the object model of the host application. By default, the value of this property is set to a null reference (Nothing in Visual Basic).</para>
<para>For a brief overview of hosting InfoPath in another application, see "The InfoPath Editor Hosted as a Control" in What's New for InfoPath Developers. For detailed information about hosting InfoPath as a control in another application, see the article titled "Hosting the InfoPath Form Editing Environment in a Custom Web Form" on the <a href="http://go.microsoft.com/fwlink?LinkID=11689">InfoPath Developer Portal</a></para>
<para>Because the <b>Host</b> property is new to Microsoft InfoPath, you must declare and cast to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4" /> type to access this method. For more information, see How to: Use Object Model Members That Are Not Compatible with InfoPath 2003.</para>
<para>This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="HostName">
<MemberSignature Language="C#" Value="public string HostName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string HostName" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.HostName" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property HostName As String" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ HostName { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.HostName : string" Usage="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.HostName" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.HostName</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(54)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the application hosting InfoPath as a control. </summary>
<value>The name of the host application.</value>
<remarks>
<para>This property is intended for use in scenarios where InfoPath is hosted as a control in another application and code running in InfoPath needs to access the name of the host application. Typically the host application name returned will be used in the title bar text of dialog boxes instead of "Microsoft Office InfoPath".</para>
<para>For a brief overview of hosting InfoPath in another application, see "The InfoPath Editor Hosted as a Control" in What's New for InfoPath Developers. For detailed information about hosting InfoPath as a control in another application, see the article titled "Hosting the InfoPath Form Editing Environment in a Custom Web Form" on the <a href="http://go.microsoft.com/fwlink?LinkID=11689">InfoPath Developer Portal</a></para>
<para>Because the <b>HostName</b> property is new to Microsoft InfoPath, you must declare and cast to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4" /> type to access this method. For more information, see How to: Use Object Model Members That Are Not Compatible with InfoPath 2003.</para>
<para>This member can be accessed without restrictions.</para>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="ImportDOM">
<MemberSignature Language="C#" Value="public void ImportDOM (Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument pxDoc);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ImportDOM(class Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument pxDoc) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.ImportDOM(Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument)" />
<MemberSignature Language="VB.NET" Value="Public Sub ImportDOM (pxDoc As IXMLDOMDocument)" />
<MemberSignature Language="C++ CLI" Value="public:
 void ImportDOM(Microsoft::Office::Interop::InfoPath::SemiTrust::IXMLDOMDocument ^ pxDoc);" />
<MemberSignature Language="F#" Value="abstract member ImportDOM : Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument -> unit" Usage="_XDocument4.ImportDOM pxDoc" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.ImportDOM(Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(45)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pxDoc" Type="Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument" />
</Parameters>
<Docs>
<param name="pxDoc">The XML data that is to be imported (merged) into the currently open form.</param>
<summary>Imports the specified XML data into the current form.</summary>
<remarks>
<para>Using the object model to import a form programmatically is equivalent to performing a merge operation in the user interface.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>ImportDOM</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to import a form from the <see cref="E:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_Event.OnMergeRequest" /> event:</para>
<code>[InfoPathEventHandler(EventType=InfoPathEventType.OnMergeRequest)]
public void OnMergeRequest(MergeEvent e)
{
thisXDocument.<span class="label">ImportDOM</span>(e.DOM);
e.ReturnStatus = true;
}</code>
</example>
<example>
<para>In the following example, the <b>ImportDOM</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to import a form from the <see cref="E:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_Event.OnMergeRequest" /> event:</para>
<code>[InfoPathEventHandler(EventType=InfoPathEventType.OnMergeRequest)]
public void OnMergeRequest(MergeEvent e)
{
thisXDocument.<span class="label">ImportDOM</span>(e.DOM);
e.ReturnStatus = true;
}</code>
</example>
</Docs>
</Member>
<Member MemberName="ImportFile">
<MemberSignature Language="C#" Value="public void ImportFile (string bstrFileURI);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ImportFile(string bstrFileURI) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.ImportFile(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub ImportFile (bstrFileURI As String)" />
<MemberSignature Language="C++ CLI" Value="public:
 void ImportFile(System::String ^ bstrFileURI);" />
<MemberSignature Language="F#" Value="abstract member ImportFile : string -> unit" Usage="_XDocument4.ImportFile bstrFileURI" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.ImportFile(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(20)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="bstrFileURI" Type="System.String" />
</Parameters>
<Docs>
<param name="bstrFileURI">The Uniform Resource Identifier (URI) of the form that is to be imported (merged) into the currently open form.</param>
<summary>Imports the specified form into the current form.</summary>
<remarks>
<para>Using the object model to programmatically import a form is equivalent to performing a merge operation in the user interface.</para>
<para>
<b>Important</b>: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, the <b>ImportFile</b> method of the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument" /> object is used to import a form:</para>
<code>thisXDocument.<span class="label">ImportFile</span>(@"C:\SomeOtherForm.xml");</code>
</example>
</Docs>
</Member>
<Member MemberName="InputParameters">
<MemberSignature Language="C#" Value="public Microsoft.Office.Interop.InfoPath.SemiTrust.InputParameterCollection InputParameters { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Office.Interop.InfoPath.SemiTrust.InputParameterCollection InputParameters" />
<MemberSignature Language="DocId" Value="P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.InputParameters" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property InputParameters As InputParameterCollection" />
<MemberSignature Language="C++ CLI" Value="public:
 property Microsoft::Office::Interop::InfoPath::SemiTrust::InputParameterCollection ^ InputParameters { Microsoft::Office::Interop::InfoPath::SemiTrust::InputParameterCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.InputParameters : Microsoft.Office.Interop.InfoPath.SemiTrust.InputParameterCollection" Usage="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4.InputParameters" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument3.InputParameters</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Office.Interop.InfoPath.SemiTrust</AssemblyName>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.DispId(55)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Office.Interop.InfoPath.SemiTrust.InputParameterCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.InputParameterCollection" /> object containing any input parameters specified using the /InputParameters command-line option, or specified using query parameters in a URL.</summary>
<value>An <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust.InputParameterCollection" /> object containing input parameters.</value>
<remarks>
<para>Input parameters consist of one or more name/value pairs separated by the ampersand (&) character that are specified when a form template is opened from the command line or a batch file using the /InputParameters command-line option. Input parameters can also be specified using query parameters when a form template is opened from a URL.</para>
<para>Because the <b>InputParameters</b> property is new to Microsoft InfoPath, you must declare and cast to the <see cref="T:Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument4" /> type to access this method. For more information, see How to: Use Object Model Members That Are Not Compatible with InfoPath 2003.</para>
<para>This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.</para>
<para />
</remarks>
<example>
<para>In the following example, an InfoPath form template is opened from the command line using the following syntax:</para>
<para>infopath.exe "C:\User Forms\DeptReport.xsn" /InputParameters "Dept=Accounting"</para>
<code>string vDept = (_XDocument4)thisXDocument.InputParameters["Dept"];</code>
<code>Dim vDept As String =
DirectCast(thisXDocument, _XDocument4).InputParameters("Dept")</code>
</example>
<example>
<para>In the following example, an InfoPath form template is opened from the command line using the following syntax:</para>
<para>infopath.exe "C:\User Forms\DeptReport.xsn" /InputParameters "Dept=Accounting"</para>
<code>string vDept = (_XDocument4)thisXDocument.InputParameters["Dept"];</code>
<code>Dim vDept As String =
DirectCast(thisXDocument, _XDocument4).InputParameters("Dept")</code>
</example>
</Docs>
</Member>
<Member MemberName="IsDirty">
<MemberSignature Language="C#" Value="public bool IsDirty { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsDirty" />