XMLNode Interface

Represents a single XML node on a document that exposes events and that can be bound to data.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

[GuidAttribute("29b82cde-df64-4c6f-a64f-87561e588ecb")]
public interface XMLNode : IBindableComponent, 
	IComponent, IDisposable, ISupportInitialize

The XMLNode type exposes the following members.

  NameDescription
Public propertyApplicationGets an Application that represents the creator of the XMLNode control.
Public propertyAttributesGets a Microsoft.Office.Interop.Word.XMLNodes collection that represents the attributes for the XMLNode control.
Public propertyBaseNameGets the name of the XMLNode control without any prefix.
Public propertyBindingContextGets or sets the collection of currency managers for the IBindableComponent. (Inherited from IBindableComponent.)
Public propertyChildNodesGets a Microsoft.Office.Interop.Word.XMLNodes collection that represents the child elements of an XMLNode control.
Public propertyChildNodeSuggestionsGets an XMLChildNodeSuggestions collection that represents the elements that may be valid children of the current XMLNode control.
Public propertyContainerInfrastructure.
Public propertyCreatorGets the application in which the XMLNode control was created.
Public propertyDataBindingsGets the collection of data-binding objects for this IBindableComponent. (Inherited from IBindableComponent.)
Public propertyDefaultDataSourceUpdateModeGets or sets the default DataSourceUpdateMode for the XMLNode.
Public propertyFirstChildGets a Microsoft.Office.Interop.Word.XMLNode object that represents the first child node in the Microsoft.Office.Tools.Word.XMLNode control.
Public propertyHasChildNodesGets a value that indicates whether the XMLNode control has child elements.
Public propertyInnerObjectGets a Microsoft.Office.Interop.Word.XMLNode that represents the underlying native object for the XMLNode.
Public propertyLastChildGets a Microsoft.Office.Interop.Word.XMLNode object that represents the last child node of the Microsoft.Office.Tools.Word.XMLNode control.
Public propertyLevelGets the level of the XMLNode control.
Public propertyNamespaceURIGets the Uniform Resource Identifier (URI) of the schema namespace for the XMLNode control.
Public propertyNextSiblingGets a Microsoft.Office.Interop.Word.XMLNode object that represents the next Microsoft.Office.Interop.Word.XMLNode object in the document that is at the same level as the Microsoft.Office.Tools.Word.XMLNode control.
Public propertyNodeTextGets or sets the text value of the XMLNode control.
Public propertyNodeTypeGets a value that indicates whether an XMLNode is an attribute or an element.
Public propertyNodeValueGets or sets the value of an XMLNode that represents an attribute.
Public propertyOwnerDocumentGets a Microsoft.Office.Interop.Word.Document that represents the parent document of the specified XMLNode control.
Public propertyParentGets a Microsoft.Office.Interop.Word.Document that represents the document containing the specified XMLNode control.
Public propertyParentNodeGets a Microsoft.Office.Interop.Word.XMLNode object that represents the parent element of the specified Microsoft.Office.Tools.Word.XMLNode control.
Public propertyPlaceholderTextGets or sets the text displayed for an XMLNode control that contains no text.
Public propertyPreviousSiblingGets a Microsoft.Office.Interop.Word.XMLNode object that represents the previous Microsoft.Office.Interop.Word.XMLNode object in the document that is at the same level as the Microsoft.Office.Tools.Word.XMLNode control.
Public propertyRangeGets a Range object that represents the portion of a document that is contained in the XMLNode control.
Public propertySiteGets or sets the ISite associated with the IComponent. (Inherited from IComponent.)
Public propertySmartTagGets a SmartTag object that represents the smart tag associated with the XMLNode control. This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010.
.
Public propertyTagInfrastructure.
Public propertyTextGets or sets the plain unformatted text of the XMLNode control.
Public propertyValidationErrorTextGets a string that represents the description for a validation error on an XMLNode control.
Public propertyValidationStatusGets a value that specifies whether an element or attribute is valid according to the attached schema.
Public propertyWordOpenXMLGets an XML string that represents the XMLNode in the Microsoft Office Word Open XML format.
Public propertyXMLGets a string that represents the XML text in the XMLNode control.
Top

  NameDescription
Public methodBeginInitSignals the object that initialization is starting. (Inherited from ISupportInitialize.)
Public methodCopyCopies the contents of the XMLNode control to the Clipboard.
Public methodCutRemoves the contents of the XMLNode control and places the contents onto the Clipboard.
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
Public methodEndInitSignals the object that initialization is complete. (Inherited from ISupportInitialize.)
Public methodget_ValidationErrorTextInfrastructure.
Public methodget_XMLInfrastructure.
Public methodLoadUpdates an XMLNode control with data from the specified XML file
Public methodLoadXml(String)Populates an XMLNode control with data from the specified XML string.
Public methodLoadXml(XmlDocument)Populates an XMLNode control with data from the root node of the specified XmlDocument.
Public methodLoadXml(XmlElement)Populates an XMLNode control with data from an XmlElement.
Public methodRemoveChildRemoves the specified child element from the XMLNode control.
Public methodSelectNodesGets a Microsoft.Office.Interop.Word.XMLNodes collection that represents all the nodes that match the XPath parameter in the order in which they appear in the Microsoft.Office.Tools.Word.XMLNode control.
Public methodSelectSingleNodeGets a Microsoft.Office.Interop.Word.XMLNode object that represents the first child node that matches the XPath parameter in the Microsoft.Office.Tools.Word.XMLNode control.
Public methodSetValidationErrorChanges the validation error text displayed to a user for an XMLNode control and forces Microsoft Office Word to report a node as invalid.
Public methodValidateValidates an individual XMLNode control against the attached XML schema or schemas.
Top

  NameDescription
Public eventAfterInsertOccurs when the user adds a new XMLNode control to the document.
Public eventBeforeDeleteOccurs when the user deletes an XMLNode control from the document, before the control is deleted.
Public eventBindingContextChangedOccurs when the value of the BindingContext property of the ContentControlBase changes.
Public eventContextEnterOccurs when the cursor is placed inside an XMLNode or one of its descendent nodes, from an area outside of the context of the node.
Public eventContextLeaveOccurs when the cursor is moved from the XMLNode control, or one of its descendent nodes, to an area outside of the context of the original node.
Public eventDeselectOccurs when the cursor is moved out of the XMLNode control.
Public eventDisposedRepresents the method that handles the Disposed event of a component. (Inherited from IComponent.)
Public eventSelectOccurs when the cursor is placed inside an XMLNode control.
Public eventValidationErrorOccurs when there is a validation error in the XMLNode control.
Top

When you map non-repeating schema elements onto a Microsoft Office Word document at design time, Visual Studio creates an XMLNode control for each elements that are allowed to appear only once in a document. A non-repeating schema element is an element with the maxOccurs attribute set to 1.

XMLNode controls can be created only in Word document-level projects at design time. They cannot be created at run time or in application-level projects. For more information, see XMLNode Control and How to: Add XMLNode Controls to Word Documents.

NoteNote

This interface is implemented by the Visual Studio Tools for Office runtime. It is not intended to be implemented in your code. For more information, see Visual Studio Tools for Office Runtime Overview.

Usage

This documentation describes the version of this type that is used in Office projects that target the .NET Framework 4 and the .NET Framework 4.5. In projects that target the .NET Framework 3.5, this type might have different members and the code examples provided for this type might not work. For documentation about this type in projects that target the .NET Framework 3.5, see the following reference section in the Visual Studio 2008 documentation: http://go.microsoft.com/fwlink/?LinkId=160658.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft