Compartilhar via


XDocument Interface

Definição

Representa o documento XML subjacente de um formulário InfoPath do Microsoft Office.

public interface class XDocument : Microsoft::Office::Interop::InfoPath::_XDocument2, Microsoft::Office::Interop::InfoPath::_XDocumentEventSink2_Event
[System.Runtime.InteropServices.Guid("096CD6A8-0786-11D1-95FA-0080C78EE3BB")]
public interface XDocument : Microsoft.Office.Interop.InfoPath._XDocument2, Microsoft.Office.Interop.InfoPath._XDocumentEventSink2_Event
type XDocument = interface
    interface _XDocument2
    interface _XDocumentEventSink2_Event
Public Interface XDocument
Implements _XDocument2, _XDocumentEventSink2_Event
Derivado
Atributos
Implementações

Exemplos

Os dados XML de origem de um formulário assumem a forma de um DOM (Modelo de Objeto de Documento XML), que é acessado por meio da DOM propriedade do objeto XDocument . O objeto XDocument também fornece uma série de propriedades que podem ser usadas para obter informações sobre o formulário e seu documento XML subjacente. Por exemplo, o código a seguir verifica se os dados no formulário foram alterados usando a IsDirty propriedade:

if (thisXDocument.IsDirty)
{
   thisXDocument.UI.Alert("Form has been changed.");
}
else
{
   thisXDocument.UI.Alert("Form has not been changed.");
}

Além das informações sobre o formulário e seu documento XML subjacente, o objeto XDocument fornece uma série de métodos que podem ser usados no formulário, como impressão, salvamento e envio. Ele também fornece uma série de eventos que podem ser usados para responder a várias ações que ocorrem no nível do formulário, como carregar um formulário, alternar exibições ou uma operação de mesclagem.

Para outro exemplo que demonstra o trabalho com o objeto XDocument , consulte

Como acessar dados do aplicativo usando o modelo de objeto InfoPath 2003.

Comentários

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. Para obter informações sobre a interface COM, incluindo um link para descrições de seus membros, consulte_XDocument3.

O objeto XDocument é um objeto-chave no modelo de objeto InfoPath que fornece propriedades, métodos e eventos que podem ser usados para interagir programaticamente e manipular os dados XML de origem de um formulário.

Embora o objeto XDocument possa ser acessado usando a XDocumentsCollection coleção, na maioria dos casos você o acessará a partir desta variávelXDocument que é instanciada no método _Startup de um projeto de código gerenciado sem passar pela coleção.

Os dados XML de origem de um formulário assumem a forma de um DOM (Modelo de Objeto de Documento XML), que é acessado por meio da DOM propriedade. O objeto XDocument também fornece uma série de propriedades que podem ser usadas para obter informações sobre o formulário e seu documento XML subjacente. Ele também fornece uma série de métodos que podem ser usados no formulário, como impressão, salvamento e envio. O objeto XDocument também fornece uma série de eventos que podem ser usados para responder a várias ações que ocorrem no nível do formulário, como carregar um formulário, alternar exibições ou uma operação de mesclagem.

Acessando o objeto XDocument

O objeto XDocument pode ser acessado em vários lugares dentro do modelo de objeto InfoPath. A tabela a seguir resume os locais em que o objeto XDocument está disponível.

XDocumentsCollection Acessado de Application. Fornece Item[Object] para acessar os objetos XDocument que ele contém.
DataDOMEventObject Fornece XDocument para acessar os dados XML de origem durante uma alteração do DOM XML.
DocActionEventObject Fornece XDocument para acessar os dados XML de origem durante um clique de botão na área do formulário.
DocEventObject Fornece XDocument para acessar os dados XML de origem durante uma operação de mesclagem de formulário ou exibição de comutador.
DocReturnEventObject Fornece XDocument para acessar o XML de origem durante o carregamento ou envio de um formulário.
VersionUpgradeEventObject Fornece XDocument para acessar o XML de origem durante a operação de atualização de versão.
WindowObject Fornece XDocument para acessar o objeto XDocument associado à janela.

Propriedades

DataAdapters

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteDataAdapters.

(Herdado de _XDocument2)
DataObjects

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteDataObjects.

(Herdado de _XDocument2)
DOM

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteDOM.

(Herdado de _XDocument2)
Errors

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteErrors.

(Herdado de _XDocument2)
Extension

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteExtension.

(Herdado de _XDocument2)
IsDirty

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteIsDirty.

(Herdado de _XDocument2)
IsDOMReadOnly

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteIsDOMReadOnly.

(Herdado de _XDocument2)
IsNew

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteIsNew.

(Herdado de _XDocument2)
IsReadOnly

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteIsReadOnly.

(Herdado de _XDocument2)
IsRecovered

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteIsRecovered.

(Herdado de _XDocument2)
IsSigned

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteIsSigned.

(Herdado de _XDocument2)
Language

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteLanguage.

(Herdado de _XDocument2)
QueryAdapter

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteQueryAdapter.

(Herdado de _XDocument2)
Role

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteRole.

(Herdado de _XDocument2)
SignedDataBlocks

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteSignedDataBlocks.

(Herdado de _XDocument2)
Solution

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteSolution.

(Herdado de _XDocument2)
UI

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteUI.

(Herdado de _XDocument2)
URI

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteURI.

(Herdado de _XDocument2)
Util

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteUtil.

(Herdado de _XDocument2)
View

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteView.

(Herdado de _XDocument2)
ViewInfos

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteViewInfos.

(Herdado de _XDocument2)

Métodos

add_OnAfterImport(_XDocumentEventSink2_OnAfterImportEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
add_OnContextChange(_XDocumentEventSink2_OnContextChangeEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
add_OnLoad(_XDocumentEventSink2_OnLoadEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
add_OnMergeRequest(_XDocumentEventSink2_OnMergeRequestEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
add_OnSaveRequest(_XDocumentEventSink2_OnSaveRequestEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
add_OnSign(_XDocumentEventSink2_OnSignEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
add_OnSubmitRequest(_XDocumentEventSink2_OnSubmitRequestEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
add_OnSwitchView(_XDocumentEventSink2_OnSwitchViewEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
add_OnVersionUpgrade(_XDocumentEventSink2_OnVersionUpgradeEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
CreateDOM()

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteCreateDOM().

(Herdado de _XDocument2)
GetDataVariable(Int32)

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteGetDataVariable(Int32).

(Herdado de _XDocument2)
GetDOM(String)

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteGetDOM(String).

(Herdado de _XDocument2)
GetNamedNodeProperty(Object, String, String)

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteGetNamedNodeProperty(Object, String, String).

(Herdado de _XDocument2)
ImportDOM(IXMLDOMDocument)

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteImportDOM(IXMLDOMDocument).

(Herdado de _XDocument2)
ImportFile(String)

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteImportFile(String).

(Herdado de _XDocument2)
PrintOut()

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consultePrintOut().

(Herdado de _XDocument2)
Query()

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteQuery().

(Herdado de _XDocument2)
remove_OnAfterImport(_XDocumentEventSink2_OnAfterImportEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
remove_OnContextChange(_XDocumentEventSink2_OnContextChangeEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
remove_OnLoad(_XDocumentEventSink2_OnLoadEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
remove_OnMergeRequest(_XDocumentEventSink2_OnMergeRequestEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
remove_OnSaveRequest(_XDocumentEventSink2_OnSaveRequestEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
remove_OnSign(_XDocumentEventSink2_OnSignEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
remove_OnSubmitRequest(_XDocumentEventSink2_OnSubmitRequestEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
remove_OnSwitchView(_XDocumentEventSink2_OnSwitchViewEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
remove_OnVersionUpgrade(_XDocumentEventSink2_OnVersionUpgradeEventHandler)

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
Save()

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteSave().

(Herdado de _XDocument2)
SaveAs(String)

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteSaveAs(String).

(Herdado de _XDocument2)
SetDataVariable(Int32, String)

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteSetDataVariable(Int32, String).

(Herdado de _XDocument2)
SetDirty(Boolean)

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteSetDirty(Boolean).

(Herdado de _XDocument2)
SetNamedNodeProperty(IXMLDOMNode, String, String)

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteSetNamedNodeProperty(IXMLDOMNode, String, String).

(Herdado de _XDocument2)
Submit()

This member is a wrapper for a member of a COM interface that has been superseded by a later version. The later version of this interface implements all members of earlier interfaces and additional new members. Para obter informações sobre esse membro à medida que ele é implementado na interface posterior, incluindo uso, observações e exemplos, consulteSubmit().

(Herdado de _XDocument2)

Eventos

OnAfterImport

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
OnContextChange

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
OnLoad

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
OnMergeRequest

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
OnSaveRequest

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
OnSign

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
OnSubmitRequest

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
OnSwitchView

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)
OnVersionUpgrade

This type is a wrapper for a coclass or coclass member that is required by managed code for COM interoperability. This class is not intended to be used in code.

(Herdado de _XDocumentEventSink2_Event)

Aplica-se a