8000 xml_add_* methods now return invisibly. by sjp · Pull Request #124 · r-lib/xml2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

xml_add_* methods now return invisibly. #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions R/xml_modify.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ xml_add_sibling.xml_node <- function(.x, .value, ..., .where = c("after", "befor
before = node_prepend_sibling(.x$node, node$node, .copy),
after = node_append_sibling(.x$node, node$node, .copy))

.x
invisible(.x)
}

#' @export
Expand All @@ -68,7 +68,7 @@ xml_add_sibling.xml_nodeset <- function(.x, .value, ..., .where = c("after", "be
.value <- list(.value)
}

Map(xml_add_sibling, rev(.x), rev(.value), ..., .where = .where, .copy = .copy)
invisible(Map(xml_add_sibling, rev(.x), rev(.value), ..., .where = .where, .copy = .copy))
}

# Helper function used in the xml_add* methods
Expand Down Expand Up @@ -109,7 +109,7 @@ xml_add_child.xml_node <- function(.x, .value, ..., .copy = inherits(.value, "xm
node <- create_node(.value, .x, ...)
node_add_child(.x$node, node$node, .copy)

node
invisible(node)
}

#' @export
Expand All @@ -122,7 +122,7 @@ xml_add_child.xml_document <- function(.x, .value, ..., .copy = inherits(.value,
doc_set_root(.x$doc, node$node)
}
node_add_child(doc_root(.x$doc), node$node, .copy)
xml_document(.x$doc)
invisible(xml_document(.x$doc))
}
}

Expand All @@ -134,7 +134,7 @@ xml_add_child.xml_nodeset <- function(.x, .value, ..., .copy = TRUE) {
.value <- list(.value)
}

Map(xml_add_child, .x, .value, ..., .copy = .copy)
invisible(Map(xml_add_child, .x, .value, ..., .copy = .copy))
}

#' @rdname xml_replace
Expand Down
0