Extract text form a string containing XML or HTML tags.
Text included between tags of interest will be returned.
If multiple tagged substrings are found, they will be returned as different
elements of a list or character vector.
Usage
EPM_custom_grep(xml_data, tag, xclass = NULL, format = "list")
Value
List or vector where each element corresponds to an in-tag substring.
Arguments
xml_data
String (character vector of length 1), this is a string
including PubMed records or string including XML/HTML tags.
tag
String (character vector of length 1), the tag of
interest (e.g., "Title") (should NOT include < > chars).
xclass
String (character vector of length 1), a tag decorator
of interest (e.g., "EIdType=\"doi\""). Can be NULL.
format
String. Must be a value in c("list", "char"). Indicates the
type of output. Defaults to "list".