This class is used for objects that are returned by parseXMLTree
.
is.XiMpLe.doc(x)as_XiMpLe_doc(obj, extra = list(), version = 2)
# S4 method for XiMpLe.doc
as_XiMpLe_doc(obj, extra = list(), version = 2)
An arbitrary R
object.
An object of old class XiMpLe.doc
.
A list of values to set the extra
slot. Note that this will be applied recursively on child nodes also.
Integer numeric,
to set the version
slot. Note that this will be applied recursively on child nodes also.
file
Character string, Name of the file.
xml
Either a named list of character values (attributes for the XML declaration of the file),
or a list of XiMpLe_node
s with tags whose names must start with a "?".
dtd
A named list, attributes for the doctype definition of the file.
children
A list of objects of class XiMpLe_node
(XiMpLe_doc
only),
or
XiMpLe.node
(old, XiMpLe.doc
only),
representing the DOM structure of the XML document.
extra
A named list that can be used to store additional information on a document (XiMpLe_doc
only).
version
A numeric integer,
currently defaults to 2 (XiMpLe_doc
only). This is a version number that can be used in the future
in combination with the added extra
slot. Should that get sime supported values that are interpreted by package methods,
the version number will be increased and the differences documented here. You shouldn't set it manually.
Class XiMpLe.doc
is the older one,
XiMpLe_doc
was introduced with XiMpLe
0.11-1. It has two new slots
(extra
and version
) that would have made it impossible to load old objects without issues. XiMpLe_doc
inherits from XiMpLe.doc
. You can convert old objects into valid new ones using the as_XiMpLe_doc
method and
are also advised to do so,
as the XiMpLe.doc
class might become deprecated in future releases.
A contructor function XiMpLe_doc(...)
is available to be used instead of new("XiMpLe_doc",
...)
.
There's also XiMpLe_doc_old(...)
to be used instead of new("XiMpLe.doc",
...)
, but you should not use that any longer.