hi, Am Freitag, 24. Mai 2013, 10:09:54 schrieb Thomas Friedrichsmeier: > On Thursday 23 May 2013 23:33:03 Yuri Chornoivan wrote: > > Guessing on the catalog sizes and their numbers, it would better to have > > one catalog for every pluginmap. > > Yes, I think so, too. I guess it would be really helpful to have a script > that will extract all files used by a given .pluginmap. This could well be > an R script using XiMpLe. Meik, I'm not sure just how much of this task you > have already scripted in XiMpLe adn/or rkwarddev. Is this trivial, already?
yes, should be as easy as this:
library(XiMpLe)
# parse the .pluginmap
some.plugin <- parseXMLTree("<path_to>/some.pluginmap")
# extract the <component> nodes, returns a list
some.plugin.comp <- XMLScan(some.plugin, "component")
# get the values of all "file" attributes
sapply(some.plugin.comp, function(x) XMLAttrs(x)[["file"]])
this could be condensed into a one-liner, but then it's harder to read ;-)
some things to be aware of: parseXMLTree() might either abort or produce
rubbish if the .pluginmap includes erroneous XML (e.g., a missing "/" or an
invalid "&"), even if RKWard gracefully ignores it. see that as a bug tracking
feature ;-) also, i've just commited a new boolean argument to XMLScan(),
"as.list", because if there's exactly one result, it will directly return the
single XiMpLe node, not a list of length one. the latter can now be forced by
"as.list=TRUE" -- but this shouldn't matter here, i guess.
viele grüße :: m.eik
--
dipl. psych. meik michalke
abt. f"ur diagnostik und differentielle psychologie
institut f"ur experimentelle psychologie
heinrich-heine-universit"at d"usseldorf
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________ RKWard-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rkward-devel
