WFS_util_showxml: Show XML fragment on screen

View source: R/WFS_utils.R

WFS_util_showxmlR Documentation

Show XML fragment on screen

Description

This is a cover function for the internal XML print functions print.xml_document, print.xml_nodeset and print.xml_node. These functions are called by the HOQCutil::cap.out() that determines which lines will be printed and the width of the output lines. The function can be used to include (part of) an XML document in documentation (as is done in a vignette for this package).

Usage

WFS_util_showxml(
  myxml,
  width = 2000,
  max_n = 20,
  lines = NULL,
  screenwidth = getOption("width", 100)
)

Arguments

myxml

XML document, node_set or node

width

Numeric scalar passed to the xml2 print function indicating how many characters of the xml lines will be shown

lines

Numerical vector indicating which lines of the print output will actually be shown. NULL indicates all. This argument is passed to HOQCutil::cap.out()

screenwidth

Numeric scalar scalar indicating at which point the print output will be wrapped. This argument is passed to HOQCutil::cap.out() as its 'width' argument

max_n=20

Numeric scalar passed to the xml2 print function indicating how many xml lines will be printed

Value

NULL (invisible)

Examples

## Not run: 
WFS_util_showxml(cap1,lines=2:3)

## End(Not run)

HanOostdijk/HOQCwfs documentation built on March 6, 2023, 8:18 a.m.