tests/testthat/_snaps/xml_nodeset.md

print method is correct

Code
  print(divs)
Output
  {xml_nodeset (10)}
   [1] <div id="wrapper">\n            <div id="root" class="redesign">\n<scrip ...
   [2] <div id="root" class="redesign">\n<script>\n    if (typeof uet == 'funct ...
   [3] <div id="nb20" class="navbarSprite">\n<div id="supertab">\t\n\t<!-- begi ...
   [4] <div id="supertab">\t\n\t<!-- begin TOP_AD -->\n<div id="top_ad_wrapper" ...
   [5] <div id="top_ad_wrapper" class="dfp_slot">\n<script type="text/javascrip ...
   [6] <div id="top_ad_reflow_helper"></div>
   [7] <div id="navbar" class="navbarSprite">\n<noscript>\n  <link rel="stylesh ...
   [8] <div id="nb_search">\n    <noscript><div id="more_if_no_javascript"><a h ...
   [9] <div id="more_if_no_javascript"><a href="/search/">More</a></div>
  [10] <div class="magnifyingglass navbarSprite"></div>
Code
  print(x, width = 13L)
Output
  {xml_document}
  <doc>
  [1] <a>123 ...
  [2] <b>123 ...
  [3] <c>12\ ...
Code
  print(x, width = 14L)
Output
  {xml_document}
  <doc>
  [1] <a>1234 ...
  [2] <b>1234 ...
  [3] <c>12\\ ...


Try the xml2 package in your browser

Any scripts or data that you put into this service are public.

xml2 documentation built on May 29, 2024, 1:28 a.m.