XMLValidity: Constructor function for XiMpLe.validity objects

Description Usage Arguments Value See Also Examples

View source: R/XMLValidity.R

Description

Create validity definitions for XiMpLe nodes, to be used by validXML.

Usage

1
2
XMLValidity(children = NULL, attrs = NULL, allChildren = NULL,
  allAttrs = NULL, empty = NULL, ignore = NULL)

Arguments

children

Named list of vectors or XiMpLe.validity objects. The element name defines the parent node name and each character string a valid child node name. If a value is in turn of class XiMpLe.validity, this object will be used for recursive validation of deeper nodes.

attrs

Named list of character vectors. The element name defines the parent node name and each character string a valid attribute name.

allChildren

Character vector, names of globally valid child nodes for all nodes, if any.

allAttrs

Character vector, names of globally valid attributes for all nodes, if any.

empty

Character vector, names of nodes that must be empty nodes (i.e., no closing tag), if any.

ignore

Character vector, names of nodes that should be ignored, if any.

Value

An object of class XiMpLe.validity

See Also

validXML

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
HTMLish <- XMLValidity(
   children=list(
     body=c("a", "p", "ol", "ul", "strong"),
     head=c("title"),
     html=c("head", "body"),
     li=c("a", "br", "strong"),
     ol=c("li"),
     p=c("a", "br", "ol", "ul", "strong"),
     ul=c("li")
   ),
   attrs=list(
     a=c("href", "name"),
     p=c("align")
   ),
   allChildren=c("!--"),
   allAttrs=c("id", "class"),
   empty=c("br")
)

rkward-community/XiMpLe documentation built on Dec. 13, 2017, 10:11 p.m.