NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlContainer.Item (String)

Returns the child element with the given name.

[C#] In C#, this member is the indexer for the XmlContainer class.

[Visual Basic]
Overloads Public Default ReadOnly Property Item( _
   ByVal name As String _
) As XmlElement
[C#]
public XmlElement this[
   string name
] {get;}
[C++]
public: __property XmlElement* get_Item(
   String* name
);
[JScript]
returnValue = XmlContainerObject.Item(name);
-or-
returnValue = XmlContainerObject(name);

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed Item property whose type is Object and whose index type is String.

Arguments [JScript]

name
The name of the child element to obtain.

Parameters [Visual Basic, C#, C++]

name
The name of the child element to obtain.

Property Value

The first child element with the given name.

Remarks

This indexer returns the first child element that has the given name and the same namespace URI as this element. If the element does not exist, it is created and added to the end of this element's child list.

It is only possible to access XmlElement child nodes with this indexer. To obtain other types of child nodes (such as text nodes) by name, use the GetNodes method.

See Also

XmlContainer Class | XmlContainer Members | System.Xml Namespace | XmlContainer.Item Overload List | Item | Item