Share via


context Property (Windows Embedded CE 6.0)

1/6/2010

Gets the node (subtree) that is applied to the selection.

Script Syntax

var objXMLDOMNode = objXMLDOMSelection.context;
objXMLDOMSelection.context = objXMLDOMNode;

Remarks

Ee502324.collapse(en-US,WinEmbedded.60).gifScript Parameters

None.

Ee502324.collapse(en-US,WinEmbedded.60).gifScript Return Value

Object. Returns the subtree that is applied to the selection.

Ee502324.collapse(en-US,WinEmbedded.60).gifC/C++ Syntax

HRESULT get_context(
  IXMLDOMNode** ppNode
);
HRESULT putref_context(
  IXMLDOMNode* pNode
);

Remarks

Ee502324.collapse(en-US,WinEmbedded.60).gifC/C++ Parameters

  • ppNode
    [out, retval] The subtree to apply the pattern to.
  • pNode
    [in] The subtree to apply the pattern to.

Ee502324.collapse(en-US,WinEmbedded.60).gifC/C++ Return Values

  • S_OK
    Value returned if the method is successful.
  • S_FALSE (for get_context only)
    Value returned if the context is invalid.
  • E_INVALIDARG (for get_context only)
    Value returned if the input argument is Null.
  • E_FAIL (for putref_context only)
    Value returned if a node with a different threading model is provided.

Ee502324.collapse(en-US,WinEmbedded.60).gifRequirements

Header msxml2.h, msxml2.idl
Windows Embedded CE Windows CE .NET 4.0 and later

General Remarks

Because the selectNodes method can be called on any node type, context can also be assigned any node type. A node from a different document from the one that originally created IXMLDOMSelection can also be specified as long as it has the same threading model. Calling context also resets the state of the node list so that nextNode starts over.

This property applies to the following interface:

IXMLDOMSelection.

See Also

Reference

XML DOM Properties