is_xml: Check if the provided string is in valid XML format.

View source: R/is_xml.R

is_xmlR Documentation

Check if the provided string is in valid XML format.

Description

Check if the provided string is in valid XML format.

Usage

is_xml(input_string)

Arguments

input_string

A character string to be checked for XML format.

Value

A logical value. If the input string is in valid XML format, returns TRUE, otherwise returns FALSE.

Author(s)

Ulrich Matter umatter@protonmail.com

Examples

is_xml('<?xml version="1.0"?><root><element>value</element></root>')
# TRUE

is_xml('<root><element>value</element></root>')
# FALSE

is_xml('')
# FALSE

TheOpenAIR documentation built on April 27, 2023, 5:10 p.m.