Skip to content

feature/xml2 port - #26

Open
LiNk-NY wants to merge 6 commits into
develfrom
feature/xml2_port
Open

feature/xml2 port#26
LiNk-NY wants to merge 6 commits into
develfrom
feature/xml2_port

Conversation

@LiNk-NY

@LiNk-NY LiNk-NY commented Jul 6, 2026

Copy link
Copy Markdown
Contributor
  • migrate XML to xml2
  • add unit tests for getHtmlTitle, getDocumentTitles, and getVignetteIndexEntry

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports HTML/XML handling from XML to xml2 by introducing compatibility wrappers and updating title extraction, along with adding RUnit tests and small fixture files to validate behavior.

Changes:

  • Added R/xml2_helpers.R implementing xmlNode(), xmlOutputDOM() / xmlTree(), and saveXML() equivalents on top of xml2.
  • Updated getHtmlTitle() to parse HTML titles with xml2 instead of XML/XPath helpers.
  • Added RUnit tests plus minimal inst/extdata fixtures for vignette title extraction paths.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
R/xml2_helpers.R Adds xml2-based compatibility wrappers for legacy XML DOM-building and serialization APIs.
R/repository.R Switches HTML title parsing from XML to xml2.
NAMESPACE Removes XML imports and adds xml2 imports.
inst/unitTests/test_repository.R Adds unit tests covering getHtmlTitle, getDocumentTitles, and getVignetteIndexEntry.
inst/extdata/vignette.Rmd Adds a source vignette fixture containing \\VignetteIndexEntry.
inst/extdata/vignette.html Adds an HTML fixture with a <title> element.
DESCRIPTION Replaces XML with xml2 in Imports and updates Collate to include the new helper file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/xml2_helpers.R
Comment thread R/xml2_helpers.R
Comment thread NAMESPACE Outdated
Comment thread R/repository.R Outdated
Comment thread inst/unitTests/test_repository.R
Comment thread inst/unitTests/test_repository.R
@LiNk-NY
LiNk-NY marked this pull request as ready for review July 7, 2026 21:47
LiNk-NY and others added 6 commits July 7, 2026 17:48
authored-by: gemini 3.5 flash
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@LiNk-NY
LiNk-NY force-pushed the feature/xml2_port branch from df1c778 to 7dad419 Compare July 7, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants