Share via


DataSource.GetNamedNodeProperty method

Gets the value of a named property for the specified XML node, which must be a nonattribute node in the main data source.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustOverride Function GetNamedNodeProperty ( _
    target As XPathNavigator, _
    name As String _
) As String
'Usage
Dim instance As DataSource
Dim target As XPathNavigator
Dim name As String
Dim returnValue As String

returnValue = instance.GetNamedNodeProperty(target, _
    name)
public abstract string GetNamedNodeProperty(
    XPathNavigator target,
    string name
)

Parameters

  • name
    Type: System.String

    The name of the property whose value is to be returned.

Return value

Type: System.String
The value of the specified named property.

Exceptions

Exception Condition
ArgumentException

The specified XML node is invalid.

ArgumentException

The specified property name is invalid.

ArgumentNullException

The parameters passed to this method are a null reference (Nothing in Visual Basic).

ArgumentException

The parameters passed to this method arenot valid. For example, they are of the wrong type or format.

Remarks

Named properties allow users to associate strings with user-defined properties of XML element nodes in the main data source. Use the GetNamedNodeProperty method to read the value of a named property. The value of a named property can be set by using the SetNamedNodeProperty method.

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.

This type or member can be accessed from code running in forms opened in Microsoft InfoPath Filler or in a Web browser.

See also

Reference

DataSource class

DataSource members

Microsoft.Office.InfoPath namespace