Aspose::Words::CompositeNode::InsertBefore method

CompositeNode::InsertBefore method

Inserts the specified node immediately before the specified reference node.

template<typename T> T Aspose::Words::CompositeNode::InsertBefore(T newChild, const System::SharedPtr<Aspose::Words::Node> & refChild)
ParameterTypeDescription
newChildTThe Node to insert.
refChildconst System::SharedPtr<Aspose::Words::Node> &The Node that is the reference node. The newChild is placed before this node.

ReturnValue

The inserted node.

Remarks

If refChild is null, inserts newChild at the end of the list of child nodes.

If the newChild is already in the tree, it is first removed.

If the node being inserted was created from another document, you should use ImportNode() to import the node to the current document. The imported node can then be inserted into the current document.

See Also