[rkward-cvs] SF.net SVN: rkward:[4401] trunk/rkward/packages/XiMpLe
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Tue Oct 30 20:24:12 UTC 2012
Revision: 4401
http://rkward.svn.sourceforge.net/rkward/?rev=4401&view=rev
Author: m-eik
Date: 2012-10-30 20:24:11 +0000 (Tue, 30 Oct 2012)
Log Message:
-----------
XiMpLe: worked on the examples
Modified Paths:
--------------
trunk/rkward/packages/XiMpLe/ChangeLog
trunk/rkward/packages/XiMpLe/DESCRIPTION
trunk/rkward/packages/XiMpLe/R/XMLNode.R
trunk/rkward/packages/XiMpLe/R/XMLTree.R
trunk/rkward/packages/XiMpLe/R/XiMpLe-package.R
trunk/rkward/packages/XiMpLe/R/node.R
trunk/rkward/packages/XiMpLe/R/parseXMLTree.R
trunk/rkward/packages/XiMpLe/R/pasteXML-methods.R
trunk/rkward/packages/XiMpLe/R/pasteXMLTag.R
trunk/rkward/packages/XiMpLe/debian/changelog
trunk/rkward/packages/XiMpLe/debian/control
trunk/rkward/packages/XiMpLe/debian/copyright
trunk/rkward/packages/XiMpLe/debian/rules
trunk/rkward/packages/XiMpLe/inst/CITATION
trunk/rkward/packages/XiMpLe/inst/NEWS.Rd
trunk/rkward/packages/XiMpLe/man/XMLNode.Rd
trunk/rkward/packages/XiMpLe/man/XMLTree.Rd
trunk/rkward/packages/XiMpLe/man/XiMpLe-package.Rd
trunk/rkward/packages/XiMpLe/man/node.Rd
trunk/rkward/packages/XiMpLe/man/parseXMLTree.Rd
trunk/rkward/packages/XiMpLe/man/pasteXML-methods.Rd
trunk/rkward/packages/XiMpLe/man/pasteXMLTag.Rd
Modified: trunk/rkward/packages/XiMpLe/ChangeLog
===================================================================
--- trunk/rkward/packages/XiMpLe/ChangeLog 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/ChangeLog 2012-10-30 20:24:11 UTC (rev 4401)
@@ -1,5 +1,9 @@
ChangeLog for package XiMpLe
+changes in version 0.03-16 (2012-10-30)
+added:
+ - added examples to all functions
+
changes in version 0.03-15 (2012-10-26)
fixed:
- eliminated a memory problem for large XML trees. calling unlist() with
Modified: trunk/rkward/packages/XiMpLe/DESCRIPTION
===================================================================
--- trunk/rkward/packages/XiMpLe/DESCRIPTION 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/DESCRIPTION 2012-10-30 20:24:11 UTC (rev 4401)
@@ -5,6 +5,8 @@
Maintainer: m.eik michalke <meik.michalke at hhu.de>
Depends:
R (>= 2.9.0),methods
+Suggests:
+ testthat
Enhances: rkward
Description: This package provides a simple XML tree parser/generator. It
includes functions to read XML files into R objects, get information out of
@@ -17,8 +19,8 @@
URL: http://reaktanz.de/?c=hacking&s=XiMpLe
Authors at R: c(person(given="Meik", family="Michalke",
email="meik.michalke at hhu.de", role=c("aut", "cre")))
-Version: 0.03-15
-Date: 2012-10-26
+Version: 0.03-16
+Date: 2012-10-30
Collate:
'XiMpLe-internal.R'
'XiMpLe.node-class.R'
Modified: trunk/rkward/packages/XiMpLe/R/XMLNode.R
===================================================================
--- trunk/rkward/packages/XiMpLe/R/XMLNode.R 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/R/XMLNode.R 2012-10-30 20:24:11 UTC (rev 4401)
@@ -12,7 +12,10 @@
#' @param namespace Currently ignored.
#' @param namespaceDefinitions Currently ignored.
#' @param .children Alternative way of specifying children, if you have them already as a list.
-#' @return An object of class XiMpLe.node
+#' @return An object of class \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}}.
+#' @seealso
+#' \code{\link[XiMpLe:XMLTree]{XMLTree}},
+#' \code{\link[XiMpLe:pasteXML]{pasteXML}}
#' @export
#' @examples
#' sample.XML.node <- XMLNode("a",
Modified: trunk/rkward/packages/XiMpLe/R/XMLTree.R
===================================================================
--- trunk/rkward/packages/XiMpLe/R/XMLTree.R 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/R/XMLTree.R 2012-10-30 20:24:11 UTC (rev 4401)
@@ -2,13 +2,17 @@
#'
#' Can be used to create full XML trees.
#'
-#' @param ... Optional children for the XML tree. Must be either objects of class XiMpLe.node or character strings,
+#' @param ... Optional children for the XML tree. Must be either objects of class
+#' \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}} or character strings,
#' which are treated as simple text values.
#' @param xml A named list, XML declaration of the XML tree. Currently just pasted, no checking is done.
#' @param dtd A named list, doctype definition of the XML tree. Valid elements are \code{doctype}, \code{id} and \code{refer}.
#' Currently just pasted, no checking is done.
#' @param .children Alternative way of specifying children, if you have them already as a list.
-#' @return An object of class XiMpLe.doc
+#' @return An object of class \code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}}
+#' @seealso
+#' \code{\link[XiMpLe:XMLNode]{XMLNode}},
+#' \code{\link[XiMpLe:pasteXML]{pasteXML}}
#' @export
#' @examples
#' sample.XML.a <- XMLNode("a",
Modified: trunk/rkward/packages/XiMpLe/R/XiMpLe-package.R
===================================================================
--- trunk/rkward/packages/XiMpLe/R/XiMpLe-package.R 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/R/XiMpLe-package.R 2012-10-30 20:24:11 UTC (rev 4401)
@@ -3,8 +3,8 @@
#' \tabular{ll}{
#' Package: \tab XiMpLe\cr
#' Type: \tab Package\cr
-#' Version: \tab 0.03-15\cr
-#' Date: \tab 2012-10-26\cr
+#' Version: \tab 0.03-16\cr
+#' Date: \tab 2012-10-30\cr
#' Depends: \tab R (>= 2.9.0),methods\cr
#' Enhances: \tab rkward\cr
#' Encoding: \tab UTF-8\cr
@@ -21,7 +21,7 @@
#' @aliases XiMpLe-package XiMpLe
#' @name XiMpLe-package
#' @docType package
-#' @title A simple XML tree parser and generator.
+#' @title The XiMpLe Package
#' @author Meik Michalke \email{meik.michalke@@hhu.de}
#' @keywords package
NULL
Modified: trunk/rkward/packages/XiMpLe/R/node.R
===================================================================
--- trunk/rkward/packages/XiMpLe/R/node.R 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/R/node.R 2012-10-30 20:24:11 UTC (rev 4401)
@@ -2,10 +2,11 @@
#'
#' This method can be used to get parts of a parsed XML tree object, or to fill it with new values.
#'
-#' @param obj An object of class \code{XiMpLe.doc} or \code{XiMpLe.node}.
+#' @param obj An object of class \code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}} or
+#' \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}}.
#' @param node A list of node names (or their numeric values), where each element is
#' the child of its previous element. duplicate matches will be returned as a list.
-#' @param what A character string, must be a valid slot name of class \code{XiMpLe.node}, like
+#' @param what A character string, must be a valid slot name of class \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}}, like
#' \code{"attributes"} or \code{"value"}. If not \code{NULL}, only that part of a node will be returned.
#' There's also two special properties for this option: \code{what="@@path"} will not return the
#' node or it's contents, but a character string with the "path" to it in the object; \code{what="obj@@path"}
Modified: trunk/rkward/packages/XiMpLe/R/parseXMLTree.R
===================================================================
--- trunk/rkward/packages/XiMpLe/R/parseXMLTree.R 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/R/parseXMLTree.R 2012-10-30 20:24:11 UTC (rev 4401)
@@ -6,7 +6,7 @@
#' from the resulting object.
#' @param object Logical, if \code{TRUE}, \code{file} will not be treated as a path name but as a
#' character vector to be parsed as XML directly.
-#' @return An object of class \code{XiMpLe.doc} with four slots:
+#' @return An object of class \code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}} with four slots:
#' \describe{
#' \item{\code{file}:}{Full path to the parsed file, or \code{"object"} if \code{object=TRUE}.}
#' \item{\code{xml}:}{XML declaration, if found.}
@@ -16,6 +16,8 @@
#' \code{"children"} (list of \code{XiMpLe.node} object, if found) and \code{"value"}
#' (text value between a pair of start/end tags, if found).}
#' }
+#' @seealso \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}},
+#' \code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}}
#' @export
#' @examples
#' \dontrun{
Modified: trunk/rkward/packages/XiMpLe/R/pasteXML-methods.R
===================================================================
--- trunk/rkward/packages/XiMpLe/R/pasteXML-methods.R 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/R/pasteXML-methods.R 2012-10-30 20:24:11 UTC (rev 4401)
@@ -22,7 +22,7 @@
#' pasteXML,XiMpLe.doc-method
#' pasteXMLNode
#' pasteXMLTree
-#' @seealso \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}}
+#' @seealso \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}},
#' \code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}}
#' @keywords methods
#' @rdname pasteXML-methods
Modified: trunk/rkward/packages/XiMpLe/R/pasteXMLTag.R
===================================================================
--- trunk/rkward/packages/XiMpLe/R/pasteXMLTag.R 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/R/pasteXMLTag.R 2012-10-30 20:24:11 UTC (rev 4401)
@@ -3,6 +3,10 @@
#' Creates a whole XML tag with attributes and, if it is a pair of start and end tags,
#' also one object as child. This can be used recursively to create whole XML tree structures
#' with this one function.
+#'
+#' @note However, you will probably not want to use this function at all, as it is much more
+#' comfortable to create XML nodes or even nested trees with \code{\link[XiMpLe:XMLNode]{XMLNode}} and
+#' \code{\link[XiMpLe:XMLTree]{XMLTree}}, and then feed the result to \code{\link[XiMpLe:pasteXML]{pasteXML}}.
#'
#' @param tag Character string, name of the XML tag.
#' @param attr A list of attributes for the tag.
@@ -23,6 +27,10 @@
#' @param tidy Logical, if \code{TRUE} the special characters "<", ">" and "&" will be replaced with the entities
#' "<", ">" and "&" in attribute values. For comment or CDATA tags, if the text includes newline characters
#' they will also be indented.
+#' @return A character string.
+#' @seealso \code{\link[XiMpLe:XMLNode]{XMLNode}},
+#' \code{\link[XiMpLe:XMLTree]{XMLTree}},
+#' \code{\link[XiMpLe:pasteXML]{pasteXML}}
#' @export
#' @examples
#' sample.XML.tag <- pasteXMLTag("a",
Modified: trunk/rkward/packages/XiMpLe/debian/changelog
===================================================================
--- trunk/rkward/packages/XiMpLe/debian/changelog 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/debian/changelog 2012-10-30 20:24:11 UTC (rev 4401)
@@ -1,3 +1,9 @@
+r-other-reaktanz-ximple (0.03-16-1) unstable; urgency=low
+
+ * new upstream release
+
+ -- m.eik michalke <meik.michalke at hhu.de> Tue, 30 Oct 2012 18:56:43 +0000
+
r-other-reaktanz-ximple (0.03-15-1) unstable; urgency=low
* new upstream release
Modified: trunk/rkward/packages/XiMpLe/debian/control
===================================================================
--- trunk/rkward/packages/XiMpLe/debian/control 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/debian/control 2012-10-30 20:24:11 UTC (rev 4401)
@@ -1,4 +1,4 @@
-Source: r-other-rkward-ximple
+Source: r-other-reaktanz-ximple
Section: math
Priority: optional
Maintainer: m.eik michalke <meik.michalke at hhu.de>
@@ -6,7 +6,7 @@
Standards-Version: 3.9.3.1
Homepage: http://reaktanz.de/?c=hacking&s=XiMpLe
-Package: r-other-rkward-ximple
+Package: r-other-reaktanz-ximple
Architecture: all
Section: math
Depends: r-base (>= 2.15.0)
Modified: trunk/rkward/packages/XiMpLe/debian/copyright
===================================================================
--- trunk/rkward/packages/XiMpLe/debian/copyright 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/debian/copyright 2012-10-30 20:24:11 UTC (rev 4401)
@@ -3,7 +3,7 @@
This Debian package was put together m.eik michalke <meik.michalke at hhu.de>.
The package was renamed from its upstream name 'XiMpLe' to
-'r-other-rkward-ximple' in harmony with the R packaging policy to indicate
+'r-other-reaktanz-ximple' in harmony with the R packaging policy to indicate
that the package is external to the CRAN or BioC repositories.
XiMpLe Copyright (C) 2012 Meik Michalke, released under the
Modified: trunk/rkward/packages/XiMpLe/debian/rules
===================================================================
--- trunk/rkward/packages/XiMpLe/debian/rules 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/debian/rules 2012-10-30 20:24:11 UTC (rev 4401)
@@ -1,9 +1,9 @@
#!/usr/bin/make -f
# -*- makefile -*-
-# debian/rules file for the Debian/GNU Linux r-other-rkward-ximple package
+# debian/rules file for the Debian/GNU Linux r-other-reaktanz-ximple package
# Copyright 2012 by m.eik michalke <meik.michalke at hhu.de>
-debRreposname := other-rkward
+debRreposname := other-reaktanz
include /usr/share/R/debian/r-cran.mk
Modified: trunk/rkward/packages/XiMpLe/inst/CITATION
===================================================================
--- trunk/rkward/packages/XiMpLe/inst/CITATION 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/inst/CITATION 2012-10-30 20:24:11 UTC (rev 4401)
@@ -2,12 +2,12 @@
title="XiMpLe: A simple XML tree parser and generator",
author="Meik Michalke",
year="2012",
- note="(Version 0.03-15)",
+ note="(Version 0.03-16)",
url="http://reaktanz.de/?c=hacking&s=XiMpLe",
textVersion =
paste("Michalke, M. (2012). ",
- "XiMpLe: A simple XML tree parser and generator (Version 0.03-15). ",
+ "XiMpLe: A simple XML tree parser and generator (Version 0.03-16). ",
"Available from http://reaktanz.de/?c=hacking&s=XiMpLe",
sep=""),
Modified: trunk/rkward/packages/XiMpLe/inst/NEWS.Rd
===================================================================
--- trunk/rkward/packages/XiMpLe/inst/NEWS.Rd 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/inst/NEWS.Rd 2012-10-30 20:24:11 UTC (rev 4401)
@@ -1,6 +1,13 @@
\name{NEWS}
\title{News for Package 'XiMpLe'}
\encoding{UTF-8}
+\section{Changes in XiMpLe version 0.03-16 (2012-10-30)}{
+ \subsection{added}{
+ \itemize{
+ \item added examples to all functions
+ }
+ }
+}
\section{Changes in XiMpLe version 0.03-15 (2012-10-26)}{
\subsection{fixed}{
\itemize{
Modified: trunk/rkward/packages/XiMpLe/man/XMLNode.Rd
===================================================================
--- trunk/rkward/packages/XiMpLe/man/XMLNode.Rd 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/man/XMLNode.Rd 2012-10-30 20:24:11 UTC (rev 4401)
@@ -24,7 +24,8 @@
if you have them already as a list.}
}
\value{
- An object of class XiMpLe.node
+ An object of class
+ \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}}.
}
\description{
Can be used to create XML nodes.
@@ -33,4 +34,13 @@
To generate a CDATA node, set \code{name="![CDATA["}, to
create a comment, set \code{name="!--"}.
}
+\examples{
+sample.XML.node <- XMLNode("a",
+ attrs=list(href="http://example.com", target="_blank"),
+ .children="klick here!")
+}
+\seealso{
+ \code{\link[XiMpLe:XMLTree]{XMLTree}},
+ \code{\link[XiMpLe:pasteXML]{pasteXML}}
+}
Modified: trunk/rkward/packages/XiMpLe/man/XMLTree.Rd
===================================================================
--- trunk/rkward/packages/XiMpLe/man/XMLTree.Rd 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/man/XMLTree.Rd 2012-10-30 20:24:11 UTC (rev 4401)
@@ -7,8 +7,10 @@
}
\arguments{
\item{...}{Optional children for the XML tree. Must be
- either objects of class XiMpLe.node or character strings,
- which are treated as simple text values.}
+ either objects of class
+ \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}} or
+ character strings, which are treated as simple text
+ values.}
\item{xml}{A named list, XML declaration of the XML tree.
Currently just pasted, no checking is done.}
@@ -22,9 +24,27 @@
if you have them already as a list.}
}
\value{
- An object of class XiMpLe.doc
+ An object of class
+ \code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}}
}
\description{
Can be used to create full XML trees.
}
+\examples{
+sample.XML.a <- XMLNode("a",
+ attrs=list(href="http://example.com", target="_blank"),
+ .children="klick here!")
+sample.XML.body <- XMLNode("body", .children=list(sample.XML.a))
+sample.XML.html <- XMLNode("html", .children=list(XMLNode("head", ""),
+ sample.XML.body))
+sample.XML.tree <- XMLTree(sample.XML.html,
+ xml=list(version="1.0", encoding="UTF-8"),
+ dtd=list(doctype="html PUBLIC",
+ id="-//W3C//DTD XHTML 1.0 Transitional//EN",
+ refer="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"))
+}
+\seealso{
+ \code{\link[XiMpLe:XMLNode]{XMLNode}},
+ \code{\link[XiMpLe:pasteXML]{pasteXML}}
+}
Modified: trunk/rkward/packages/XiMpLe/man/XiMpLe-package.Rd
===================================================================
--- trunk/rkward/packages/XiMpLe/man/XiMpLe-package.Rd 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/man/XiMpLe-package.Rd 2012-10-30 20:24:11 UTC (rev 4401)
@@ -2,14 +2,14 @@
\name{XiMpLe-package}
\alias{XiMpLe}
\alias{XiMpLe-package}
-\title{A simple XML tree parser and generator.}
+\title{The XiMpLe Package}
\description{
A simple XML tree parser and generator.
}
\details{
\tabular{ll}{ Package: \tab XiMpLe\cr Type: \tab
- Package\cr Version: \tab 0.03-15\cr Date: \tab
- 2012-10-26\cr Depends: \tab R (>= 2.9.0),methods\cr
+ Package\cr Version: \tab 0.03-16\cr Date: \tab
+ 2012-10-30\cr Depends: \tab R (>= 2.9.0),methods\cr
Enhances: \tab rkward\cr Encoding: \tab UTF-8\cr License:
\tab GPL (>= 3)\cr LazyLoad: \tab yes\cr URL: \tab
http://reaktanz.de/?c=hacking&s=XiMpLe\cr }
Modified: trunk/rkward/packages/XiMpLe/man/node.Rd
===================================================================
--- trunk/rkward/packages/XiMpLe/man/node.Rd 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/man/node.Rd 2012-10-30 20:24:11 UTC (rev 4401)
@@ -9,22 +9,24 @@
\alias{node,XiMpLe.XML-method}
\title{Extract/manipulate a node or parts of it from an XML tree}
\arguments{
- \item{obj}{An object of class \code{XiMpLe.doc} or
- \code{XiMpLe.node}.}
+ \item{obj}{An object of class
+ \code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}} or
+ \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}}.}
\item{node}{A list of node names (or their numeric
values), where each element is the child of its previous
element. duplicate matches will be returned as a list.}
\item{what}{A character string, must be a valid slot name
- of class \code{XiMpLe.node}, like \code{"attributes"} or
- \code{"value"}. If not \code{NULL}, only that part of a
- node will be returned. There's also two special
- properties for this option: \code{what="@path"} will not
- return the node or it's contents, but a character string
- with the "path" to it in the object;
- \code{what="obj at path"} is the same but won't have
- \code{obj} substituted with the object's name.}
+ of class
+ \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}}, like
+ \code{"attributes"} or \code{"value"}. If not
+ \code{NULL}, only that part of a node will be returned.
+ There's also two special properties for this option:
+ \code{what="@path"} will not return the node or it's
+ contents, but a character string with the "path" to it in
+ the object; \code{what="obj at path"} is the same but won't
+ have \code{obj} substituted with the object's name.}
\item{cond.attr}{A named character string, to further
filter the returned results. If not \code{NULL}, only
Modified: trunk/rkward/packages/XiMpLe/man/parseXMLTree.Rd
===================================================================
--- trunk/rkward/packages/XiMpLe/man/parseXMLTree.Rd 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/man/parseXMLTree.Rd 2012-10-30 20:24:11 UTC (rev 4401)
@@ -18,19 +18,29 @@
to be parsed as XML directly.}
}
\value{
- An object of class \code{XiMpLe.doc} with four slots:
- \describe{ \item{\code{file}:}{Full path to the parsed
- file, or \code{"object"} if \code{object=TRUE}.}
- \item{\code{xml}:}{XML declaration, if found.}
- \item{\code{dtd}:}{Doctype definition, if found.}
- \item{\code{children}:}{A list of objects of class
- \code{XiMpLe.node}, with the elements \code{"name"} (the
- node name), \code{"attributes"} (list of attributes, if
- found), \code{"children"} (list of \code{XiMpLe.node}
+ An object of class
+ \code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}} with
+ four slots: \describe{ \item{\code{file}:}{Full path to
+ the parsed file, or \code{"object"} if
+ \code{object=TRUE}.} \item{\code{xml}:}{XML declaration,
+ if found.} \item{\code{dtd}:}{Doctype definition, if
+ found.} \item{\code{children}:}{A list of objects of
+ class \code{XiMpLe.node}, with the elements \code{"name"}
+ (the node name), \code{"attributes"} (list of attributes,
+ if found), \code{"children"} (list of \code{XiMpLe.node}
object, if found) and \code{"value"} (text value between
a pair of start/end tags, if found).} }
}
\description{
Read an XML file into an R object
}
+\examples{
+\dontrun{
+sample.XML.object <- parseXMLTree("~/data/sample_file.xml")
+}
+}
+\seealso{
+ \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}},
+ \code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}}
+}
Modified: trunk/rkward/packages/XiMpLe/man/pasteXML-methods.Rd
===================================================================
--- trunk/rkward/packages/XiMpLe/man/pasteXML-methods.Rd 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/man/pasteXML-methods.Rd 2012-10-30 20:24:11 UTC (rev 4401)
@@ -36,7 +36,7 @@
be used.
}
\seealso{
- \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}}
+ \code{\link[XiMpLe:XiMpLe.node-class]{XiMpLe.node}},
\code{\link[XiMpLe:XiMpLe.doc-class]{XiMpLe.doc}}
}
\keyword{methods}
Modified: trunk/rkward/packages/XiMpLe/man/pasteXMLTag.Rd
===================================================================
--- trunk/rkward/packages/XiMpLe/man/pasteXMLTag.Rd 2012-10-30 18:37:23 UTC (rev 4400)
+++ trunk/rkward/packages/XiMpLe/man/pasteXMLTag.Rd 2012-10-30 20:24:11 UTC (rev 4401)
@@ -44,10 +44,32 @@
For comment or CDATA tags, if the text includes newline
characters they will also be indented.}
}
+\value{
+ A character string.
+}
\description{
Creates a whole XML tag with attributes and, if it is a
pair of start and end tags, also one object as child.
This can be used recursively to create whole XML tree
structures with this one function.
}
+\note{
+ However, you will probably not want to use this function
+ at all, as it is much more comfortable to create XML
+ nodes or even nested trees with
+ \code{\link[XiMpLe:XMLNode]{XMLNode}} and
+ \code{\link[XiMpLe:XMLTree]{XMLTree}}, and then feed the
+ result to \code{\link[XiMpLe:pasteXML]{pasteXML}}.
+}
+\examples{
+sample.XML.tag <- pasteXMLTag("a",
+ attr=list(href="http://example.com", target="_blank"),
+ child="klick here!",
+ empty=FALSE)
+}
+\seealso{
+ \code{\link[XiMpLe:XMLNode]{XMLNode}},
+ \code{\link[XiMpLe:XMLTree]{XMLTree}},
+ \code{\link[XiMpLe:pasteXML]{pasteXML}}
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list