次の方法で共有


splitText Method (Compact 2013)

3/26/2014

Splits this text node into two text nodes at the specified offset and inserts the new text node into the tree as a sibling that immediately follows this node.

Syntax

var objXMLDOMText = oXMLDOMText.splitText(offset);
HRESULT splitText(  long offset,  IXMLDOMText** rightHandTextNode);

Parameters

Script

  • offset
    Long integer. Number of characters at which to split this text node into two nodes, starting from zero.

C/C++

  • offset
    [in] Number of characters at which to split this text node into two nodes, starting from zero.
  • rightHandTextNode
    [out, retval] New text node.

Return Value

Script

Object. Returns the new text node.

C/C++

  • S_OK
    Value returned if successful.
  • S_FALSE
    Value when returning Null.
  • E_FAIL
    Value returned if an error occurs.

Remarks

If you specify an offset of zero, the first text node is empty and the right-hand text node contains the previous contents of the node. If you specify an offset beyond the end of the string, a new, empty right-hand text node is created.

This method applies to the following objects and interfaces:

IXMLDOMCDATASection and IXMLDOMText.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

XML DOM Methods