Displaying 20 results from an estimated 300 matches similar to: "SAX Parser best practise"
2012 Oct 26
1
Parsing very large xml datafiles with SAX: How to profile <anonymous> functions?
Hello everyone,
I'm trying to parse a very large XML file using SAX with the XML package
(i.e., mainly the xmlEventParsing function). This function takes as an
argument a list of other functions (handlers) that will be called to handle
particular xml nodes.
If when I use Rprof(), all the handler functions are lumped together under
the <anonymous> label, and I get something like this:
2005 May 08
2
Extract just some fields from XML
Hello!
I am trying to get specific fields from an XML document and I am totally
puzzled. I hope someone can help me.
# URL
URL<-"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=11877539,11822933,11871444&retmode=xml&rettype=citation"
# download a XML file
tmp <- xmlTreeParse(URL, isURL = TRUE)
tmp <- xmlRoot(tmp)
Now I want to extract only
2007 Sep 01
2
Importing huge XML-Files
Dear all,
for my diploma thesis I have to import huge XML-Files into R for
statistical processing - huge means a size about 33 MB.
I'm using the XML-Package version 1.9
As far as reading the complete file into R via xmlTreeParse doesn't
work or is too slow, I'm trying to use xmlEventParse but I got
completely stuck.
I have many different type of nodes
+ <configuration>
2007 Sep 04
1
SOLVED: importing huge XML-Files -- new problem: special characters
Hi all,
thanks to the people who replied to my question! I finally solved the
issue by writing own handlers and using xmlEventParse - which leads
to the following problem which is so odd that its probably a bug.
I use several special charachter in my XML-File, e.g. umlauts or ? or
? - but no matter how I encode my XML (UTF or ISO) or I escape these
characters xmlEventParse always stops
2012 Mar 21
1
Trouble installing the XML package
Hello everyone,
I am probably not the only one having trouble with this package but here goes.
I want to install XML on Ubuntu. I installed libxml2-dev and
everything works out fine until I get the following:
Error in reconcilePropertiesAndPrototype(name, slots, prototype,
superClasses, :
No definition was found for superclass "namedList" in the
specification of class
2005 May 10
0
Fwd: Extract just some fields from XML]
Duncan, you are a king!
Thanks a lot for this cookie. It really helped me. Thanks for the code
as well as detailed explanation at the end.
>Hi Gregor.
>
>Here is a function that will collect all of the nodes in the
>XML document whose names are in the vector elementNames
>
>getElements =
>function(elementNames)
>{
> els = list()
>
> startElement = function(node,
2010 Nov 10
2
odfWeave/XML Windows issue
I am getting the following error when using odfWeave
Error in xmlEventParse(infile, handlers = handlers, trim = FALSE, state =
state) :
File content_1.xml does not exist
This appears to be the same issue detailed in
http://markmail.org/message/qsrqdtozizlngbrt#query:+page:1+mid:qsrqdtozizlngbrt+state:results
however the link to XML_1.93-2.3.zip appears to be dead. Is there either a
better
2003 Sep 09
1
Building XML package for MacOS X
I am working to build the XML package for R on MacOS X. I have installed
libxml2-2.5.9 into /usr/local. I set the
LIBXML_INCDIR=/usr/local/include/libxml2. I use R INSTALL, I get the
following:
R INSTALL -c -l /usr/local/R/library XML_0.94-1.tar.gz
:
:
:
gcc -bundle -flat_namespace -undefined suppress -L/sw/lib -L/usr/local/lib
-o XML.so DocParse.o EventParse.o ExpatParse.o HTMLParse.o
2003 Oct 09
2
building XML-0.95-1 on MacOS
I am trying to build the XML package on MacOS. I am using the fink
installation of libxml-1.8.17. The configuration information is:
Configuration information:
Libxml settings
libxml include directory: /sw/include/gnome-xml
libxml library directory: -L/sw/lib -lxml -lz -lz -lxml
libxml 2: no
Compilation flags: -I/sw/include/gnome-xml
-I/sw/include/gnome-xml/libxml
2008 Jun 10
1
Parse XML
Could someone provide a link or examples of parsing XML document in R? Few
specific questions below:
For instance I can retrieve specific nodes using this:
node <- xpathApply(xml, "//" %+% xtag, xmlValue)
1) I want to be able to retrieve parent node for this node, how can I do
this? getParentNode() does not seem to cut it.
2) How can I retrieve children nodes for a particular
2008 Oct 23
4
odfWeave error
odfWeave is throwing up a cryptic error, after successfully processing a
file with a large number of figures (~30) and many \Sexpr{} calls. The
error is (at least to me) cryptic. I am not sure where to look to
correct this problem.
Here's the error:
Post-processing the contents
Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers,
as.logical(addContext), :
2012 Oct 26
1
Parsing very large xml datafiles with SAX (XML package): What data structure should I favor?
Hello again,
I have another question related to parsing a very large xml file with SAX:
what kind of data structure should I favor? Unlike using DOM function that
can return lists of relevant nodes and let me use various versions of
'apply', the SAX parsing returns me one thing at a time.
I first tried to simply append to simple solution of appending to lists as
I get the data. But I
2012 Aug 21
0
CEBA-2012:1184 CentOS 5 perl-XML-SAX FASTTRACK Update
CentOS Errata and Bugfix Advisory 2012:1184
Upstream details at : http://rhn.redhat.com/errata/RHBA-2012-1184.html
The following updated files have been uploaded and are currently
syncing to the mirrors: ( sha256sum Filename )
i386:
85aed94f1ee9a2c4886d2bbca6ccd73b59d9e9e0903f866c84e12219703faeca perl-XML-SAX-0.14-13.el5.noarch.rpm
x86_64:
2011 Nov 14
0
CEBA-2011:1446 CentOS 5 i386 perl-XML-SAX FASTTRACK Update
CentOS Errata and Bugfix Advisory 2011:1446
Upstream details at : http://rhn.redhat.com/errata/RHBA-2011-1446.html
The following updated files have been uploaded and are currently
syncing to the mirrors: ( md5sum Filename )
i386:
47eeab4c308fbf62d697aa7130cad9a4 perl-XML-SAX-0.14-11.noarch.rpm
Source:
87dceb01f600717c787f9bc069d5bac9 perl-XML-SAX-0.14-11.src.rpm
--
Johnny Hughes
CentOS
2011 Nov 14
0
CEBA-2011:1446 CentOS 5 x86_64 perl-XML-SAX FASTTRACK Update
CentOS Errata and Bugfix Advisory 2011:1446
Upstream details at : http://rhn.redhat.com/errata/RHBA-2011-1446.html
The following updated files have been uploaded and are currently
syncing to the mirrors: ( md5sum Filename )
x86_64:
47eeab4c308fbf62d697aa7130cad9a4 perl-XML-SAX-0.14-11.noarch.rpm
Source:
87dceb01f600717c787f9bc069d5bac9 perl-XML-SAX-0.14-11.src.rpm
--
Johnny Hughes
2006 Jul 26
0
SAX Parsing and erb?
Hi,
I''m trying to parse a XML document and put some of that information
inside a rhtml file. I also have partials that I want to wrap around
content in the XML stream. However, I don''t have any clue how to pass
an object to the SAX2Listener so it can combine the partials and the XML
together. Normally, in java I would pass the HttpResponse object or the
PrintWriter
2005 Sep 28
4
A document about implementing dtrace probes in SAX
Hi,
I have mentioned before that we have added some sdt dtrace probes in SAX,
our APL interpreter. Encouraged by Angelo and Jignesh, I have created a
small document (5 pages) describing our experience with it, together with
some problems we have encountered and some scripts we use for
pretty-printing dtrace outputs.
The said document can be found at
2012 Oct 13
0
XML_3.95-0.1.tar.gz does not build on FreeBSD
I tried to build (and install) XML_3.95-0.1.tar.gz on FreeBSD
10.0-CURRENT amd64, but it stopped during the check of
R_HAS_REMOVE_FINALIZERS (full log appended):
----------------------------------
R CMD INSTALL XML_3.95-0.1.tar.gz
[..snip..]
Checking for 1.8: -DR_HAS_REMOVE_FINALIZERS=1
-I/usr/local/include/libxml2 -I/usr/local/include
Using libxml2.*
checking for gzopen in -lz... gcc46
2009 Feb 24
1
odfWeave problem "Error in xmlEventParse"
Dear list,
Sorry for bothering you with a pure odfSweave question, but I just ran
into a problem that I cannot find the cause of.
Anyonse seen this before? This file "used to work", but not anymore.
Would apreciate all the help I could get.
/Fredrik
---------------------------------------------------------------
>
2007 Dec 02
1
odfWeave error
hello all,
I trying to use the package 'odfWeave'
and I get the follow error:
### error message
#############################################################
...
Removing content.xml
Post-processing the contents
Error in .Call("RS_XML_Parse", file, handlers, as.logical(addContext), :
Error in the XML event driven parser for content_1.xml: error parsing
attribute name