Displaying 4 results from an estimated 4 matches for "xmlelementsbytagnam".
Did you mean:
xmlelementsbytagname
2006 Nov 01
4
splitting very long character string
...long character array (>500k characters) that need to split by '\n' resulting in an array of about 60k numbers. The help on strsplit says to use perl=TRUE to get better formance, but still it takes several minutes to split this string.
The massive string is the return value of a call to xmlElementsByTagName from the XML library and looks like this:
...
12345
564376
5674
6356656
5666
...
I've to read about a hundred of these files and was wondering whether there's a more efficient way to turn this string into an array of numerics. Any ideas?
thanks a lot for your help
and kind regards,...
2012 Aug 10
3
Parsing large XML documents in R - how to optimize the speed?
...arsing
the xml tree;
-vectorizing the parsing (i.e., replacing loops like "for(node in
group.of.nodes) {...}" by "sapply(group.of.node, function(node){...}")
I gained another 5 seconds by making small changes to the functions used
(like replacing 'getNodeset' by 'xmlElementsByTagName' when I don't need to
navigate to the children nodes).
Now I am blocked at around 35 seconds and I would still like to cut this
time by a 5x, but I have no clue what to do to achieve this gain. I'll try
to expose as briefly as possible the relevant structure of the xml file I
am parsin...
2003 Feb 25
1
How to modify XML documents and save changes
Dear,
I want to read XML documents, add child nodes to some elements and store
everything back as an XML document.
I've tryed the following:
doc <- xmlTreeParse("file.xml")
QTListNode<-xmlElementsByTagName(xmlRoot(doc)[[1]],"tagname")
append.xmlNode(QTListNode[[1]],newXMLNode(name ="Norm", attrs = NULL))
saveXML(doc, file = "out.xml", compression = 0, indent=T)
This doesn't seem to work.
Can anyone help?
Thanks,
Steffen
2005 Sep 21
5
SAX Parser best practise
Dear All,
I have a question regarding best practise in setting up a XML parser
within R.
Because I have files with more than 100 MB and I'm only interested in
some values I think a SAX-like parser using xmlEventParse() will be the
best solution.
Unfortunately the values I'm looking for, to construct some higher "mass
spectrum", are distributed over different lines: as