NEWS {XiMpLe} | R Documentation |
XMLNode()
: first argument was renamed from "name"
to "tag_name"
to
improve the newly added feature to add attributes via the dots argument
(see below); since "name"
is also a very common attribute and most users
will likely have omitted the first argument name, this hopefully doesn't
break too many scripts. if it does, you'll get an appropriate error
message
XMLNode()
: you can now define attributes in the dots argument as well by
using a named character string; the attrs argument can still be used as
before, it just doesn't have a NULL default value any more
XMLNode()
: defining an attribute value as character()
will result in an
empty attribute
parseXMLTree()
: is now able to deal with empty attributes; to silently
drop empty attributes instead, you can use the new
drop="empty_attributes"
option
pasteXML()
/pasteXMLTag(): re-wrote most oft the pasting routine resulting
in better formatted output
XMLValidity()
: constructor function is now directly derived from the
class definition instead of a separate function/file
XMLNode()
: arguments are no longer NULL if unused (formals)
code was re-written and cleaned up all over the place
XiMpLe_node/XiMpLe_doc: New object classes inheriting from XiMpLe.node
and XiMpLe.doc, respectively, adding two new slots, "extra"
and
"version"
; "extra"
is currently used to implement the ability to store a
"shine"
level on each node individually (see XMLNode()
below);
XiMpLe.node and XiMpLe.doc should no longer be used, they are currently
still around only for backwards compatibility
as_XiMpLe_node()
/as_XiMpLe_doc(): methods to recursively update old
XiMpLe.node and XiMpLe.doc objects into XiMpLe_node and XiMpLe_doc
gen_tag_functions()
: generate shortcut functions to create XML tags with
less typing and better readability of your code
provide_file()
: function to keep referenced files up to date in a project
directory
pasteXML()
/pasteXMLTag(): new arguments "as_script"
, "func_name"
, and
"func_rename"
; if "as_script=TRUE" you will not get XML code but R script
code that can be used together with gen_tag_functions()
to re-generate
the XiMpLe object. a use case is existing XML code you would like to
maintain with XiMpLe: import it with parseXMLTree()
and make an initial
script with pasteXML(as_script=TRUE)
you can now define the default indentation character by setting the
global option "XiMpLe_indent"
XiMpLe_node()
/XiMpLe_doc(): new constructor functions to be used instead
of new("XiMpLe_node"
)/new("XiMpLe_doc"
)
XMLNode()
: new argument "shine"
now allows to change the shine level from
a node onward, overwriting the level set with pasteXML()
globally
correctly itemized the ChangeLog, only took me 11+ years to notice
*-package.R/.Rd: use macros like \packageDescription{}
pasteXMLTag()
: fixed warning when tag contains only whitespace chars
pasteXML()
: new argument "tidy.omit"
to define node names where "tidy"
should not replace characters; by default <![CDATA[ ]]> nodes are omitted
node<-: somehow sapply()
in R-devel began to return lists where until now
vectors were returned, which broke this method
consequently use USE.NAMES=FALSE in sapply to reduce memory overhead replaced SWeave/PDF vignette with a version in RMarkdown/HTML
XMLValue()
didn't return values in "!value!" special child nodes
adjusted internal function XML.nodes()
to work with R 3.3 (embedding S4
objects in lists)
new method validXML()
for some basic validity checks
new class XiMpLe.validity to define valid child nodes and attributes
new function is.XiMpLe.validity()
new method XMLgenerators()
for objects of class XiMpLe.validity
new tests for validity checks
XMLTree()
(and hence objects of class XiMpLe.doc) now also accept a list
of XiMpLe nodes with <?... ?> style tags as the "xml"
slot
moved documentation of is.XiMpLe.node()
and is.XiMpLe.doc()
to the
respective classes
pasteXML()
gained support for tag names starting with "?" and ends them
with "?>" instead of "/>"
parseXMLTree()
now accepts more than one XML declaration at the beginning
of a file
version number took a big jump only because of the CRAN policies!
relocated the unit tests to tests/testthat
XMLScanDeep()
was said to examine node names, children and values as well
as attributes, but in fact it was hard-wired on attributes only. removed
children from the list and added support for names and values
corrected internal function setMinIndent()
and pasteXMLTag()
for better
indentation for comments
internal function indent()
can now handle negative levels
added curly brackets to the function bodies of all setGeneric()
calls to
satisfy roxygen2
allowing empty attributes (attr=""
), these were skipped, but only if
there was more than one attribute
new attribute "as.list"
added to XMLScan()
, if TRUE forces the return
value to be a list of length 1 (default is still to directly return the
single node).
new method XMLScanDeep()
recursively scans for attributes and returns all
which were found
added a proper GPL notice at the beginning of each R file the vignette was moved from inst/doc to inst/vignettes
synced names of Author: and Maintainer: in DESCRIPTION with Autors@R:
internally replaced paste(..., sep=""
) calls with paste0(...). for R
versions older than 2.15 (when paste0()
was introduced), a wrapper
function should kick in, so we don't need to change the dependencies.
new methods XMLScan()
and XMLScan()
<- to search an XML tree recursively
for appearances of certain node names
renamed getter methods from getXML*() into the more generic XML*()
added setter methods XML*()<- to all getter methods
added tests for getter/setter methods
added proper is.XiMpLe.node()
and is.XiMpLe.doc()
functions
added getter functions for all slots in XiMpLe.node and XiMpLe.doc
objects (e.g., getXMLName()
to get the name slot of a XiMpLe.node object)
added examples to all functions
added a vignette
additional tests for node()
<-
fixed dropping of last tag/text value if XML was incomplete, e.g., just an excerpt of a full tree
fixed handling of empty tags completely without space, e.g. "<br/>" instead of "<br />"
parsing error for DOCTYPE nodes mixed up elements and previously ignored
the "decl"
value
node()
<- now replaces both text values and pseudo tags with a new value.
this can still be problematic for child nodes which contain a mix of
pseudo and actual tags, so a warning will be given until this is resolved
node()
now reports text values of nodes which have "value"
and a pseudo
tag at the same time as one character string, like pasteXML does
eliminated a memory problem for large XML trees. calling unlist()
with
use.names=FALSE really makes a difference...
reviewed the garbage collecting and internally moved it out of
XML.nodes()
into XML.single.tags()
forcing garbage collection gc()
in internal function XML.nodes()
, which
iterates through parsed XML trees
better handling of text value indentation via "shine"
and "tidy"
added a LICENSE file
debianized the sources
parseXMLTree()
now takes connections as "file"
parameter
commented CDATA tags (like they're used in XHTML) can now be detected and
pasted
pasteXMLTag()
adjusts indentation level of value tags and comments
feeding internet addresses to parseXMLTree()
no longer throws an error,
skipping normalize.path()
then now
parseXMLTree()
now preserves newlines in value tags and comments
node()
now also works with single XiMpLe.node objects (not only full
trees)
added pasteXML methods to paste objects of classes XiMpLe.node and
XiMpLe.doc in a more general manner. the former functions pasteXMLNode()
and pasteXMLTree()
are replaced by mere wrapper frunctions to pasteXML()
and should not be used any longer.
fixed dropped text value if node also had child nodes in pasteXML()
fixed missing quotes in DOCTYPE id (pasteXML()
)
added functions XMLNode()
and XMLTree()
as constructor functions for XML
nodes and trees.
added opton "object"
to parseXMLTree()
, to be able to parse XML trees not
only from files, but also character vectors
output of internal function XML.single.tags()
has no colname any more
text values of nodes are no longer followed by an empty newline in
pasteXMLNode()
fixed bug in parsing of attributes, their names are now all quoted by default o not run into issues if they contain R-sensitive characters (like "http-equiv")
re-formatted the ChangeLog so roxyPackage can translate it into a NEWS.Rd file
rewrote large parts of internal function XML.single.tags()
for more
efficiency, allthough it's still quite lethargic when handling huge XML
trees
added "&" to the special characters for "tidy"
(only applies if theres
space before and after)
"tidy"
now also indents text in comments and CDATA if it includes the
newline character
added "tidy"
option to the paste functions, which is TRUE by default
since "<" and ">" are invalid in attributes and text anyway
fixed tree parsing bug (in rare cases, comment and CDATA entries caused parsing to choke on empty lines)
added show methods for objects of class XiMpLe.doc and XiMpLe.node
changed default 'shine' value of pasteXMLNode()
and pasteXMLTree()
from 2
to 1
pasteXMLNode()
and pasteXMLTree()
now try to call each other if fed with
the wrong class object, but a warning is given
changed handling of 'value' in pasteXMLNode()
, now reflects 'shine'
setting/indentation
added docs for classed XiMpLe.doc and XiMpLe.node
fixed outstanding issue with complex value structures
changed "Author@R" to "Authors@R" in DESCRIPTION (for R >= 2.14)
fixed missing "methods"
dependecy
adjusted docs a little
added option "indent.by"
to the paste functions, in case one prefers
space over tab.
moved all rk.* functions out of this package and into its own (rkwardplugdev)
tiny improvements to XML formatting
added functions rk.XML.tabbook()
, rk.XML.dropdown()
, rk.XML.plugin()
rk.XML.pluginmap()
and rk.plugin.skeleton()
[to be moved again]
improved handling of comments a lot
fixed typo bug in XML.single.tags()
improved support for comments and CDATA
improved XML formatting
added functions pasteXMLTree()
and pasteXMLNode()
added validity checks for classes XiMpLe.doc and XiMpLe.node
added function rk.XML.about()
[which will probably be moved out of the
package]
writing new node values with node<-() partly works
rewrote and renamed getNode()
to node()
checks XML and DTD declaration now
added getNode()
method
iterating through an XML tree actually works now
initial release via reaktanz.de