wfstags: Tag functions fg and bg

wfstagsR Documentation

Tag functions fg and bg

Description

The fg and bg functions are auxiliary functions to create xml elements. Using these functions only the start tag and contents have to be provided;
e.g.

bg('PropertyName', 'topp:objec_omschrijf')
will create
<PropertyName>topp:objec_omschrijf</PropertyName>

The function fg allows additional arguments for the tag and allows subtags. See Examples and the functions in wfsfilteraux

Usage

fg(tag, ..., ta = NULL, sep = WFS_get_sep())

bg(tag, value = "")

Arguments

tag

Character with tag that will be used as both start and end tag

...

Character arguments that will be inserted between start and end tag

ta

Character with additional information for start tag

sep

NULL for the default separator (set by WFS_set_sep()) or required separator otherwise. Only one of consecutive separators will be kept

value

Character argument that will be inserted between start and end tag

Value

Character vector with the generated xml element

Examples

xml_clause = fg(
  'PropertyIsLike'
  , bg('PropertyName', 'topp:objec_omschrijf')
  , bg('Literal', '.unmoolen')
  , ta = 'wildCard="*" singleChar="." escape="!"'
  , sep = "\n"
  )
# cat(xml_clause)
# <PropertyIsLike wildCard="*" singleChar="." escape="!">
# <PropertyName>topp:objec_omschrijf</PropertyName>
# <Literal>.unmoolen</Literal>
# </PropertyIsLike>

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