Adding API Poco::XML insertAfterNP() (#4061)

This commit is contained in:
tuduongquyet
2023-11-27 01:49:50 +07:00
committed by GitHub
parent 388a3b4010
commit af69d61ff5
6 changed files with 112 additions and 7 deletions

View File

@@ -37,6 +37,7 @@ public:
Node* firstChild() const;
Node* lastChild() const;
Node* insertBefore(Node* newChild, Node* refChild);
Node* insertAfterNP(Node* newChild, Node* refChild);
Node* replaceChild(Node* newChild, Node* oldChild);
Node* removeChild(Node* oldChild);
Node* appendChild(Node* newChild);

View File

@@ -52,6 +52,7 @@ public:
NamedNodeMap* attributes() const;
Document* ownerDocument() const;
Node* insertBefore(Node* newChild, Node* refChild);
Node* insertAfterNP(Node* newChild, Node* refChild);
Node* replaceChild(Node* newChild, Node* oldChild);
Node* removeChild(Node* oldChild);
Node* appendChild(Node* newChild);

View File

@@ -133,6 +133,14 @@ public:
/// If newChild is a DocumentFragment object, all of its children are
/// inserted in the same order, before refChild. If the newChild is already
/// in the tree, it is first removed.
virtual Node* insertAfterNP(Node* newChild, Node* refChild) = 0;
/// Inserts the node newChild after the existing child node refChild.
///
/// If refChild is null, insert newChild at the beginning of the list of children.
/// If newChild is a DocumentFragment object, all of its children are
/// inserted in the same order, after refChild. If the newChild is already
/// in the tree, it is first removed.
virtual Node* replaceChild(Node* newChild, Node* oldChild) = 0;
/// Replaces the child node oldChild with newChild in the list of children,