search for: savexml

Displaying 17 results from an estimated 17 matches for "savexml".

Did you mean: save_fl
2008 Apr 29
4
XML write?
Is there any function to write a XML structure, after it was read using xmlTreeParse? Ex: library(XML) x <- xmlTreeParse("Irpf2008/aplicacao/dados/12345678901/12345678901.xml") # write it... Alberto Monteiro PS: please, brazilians, don't be offended by my foul language!
2011 Sep 05
2
htmlParse hangs or crashes
...rnalDocument" "XMLInternalDocument" .x #returns *** caught segfault *** address 0x1398754, cause 'memory not mapped' Traceback: 1: .Call("RS_XML_dumpHTMLDoc", doc, as.integer(indent), as.character(encoding), as.logical(indent), PACKAGE = "XML") 2: saveXML(from) 3: saveXML(from) 4: asMethod(object) 5: as(x, "character") 6: cat(as(x, "character"), "\n") 7: print.XMLInternalDocument(<pointer: 0x11656d3e0>) 8: print(<pointer: 0x11656d3e0>) Possible actions: 1: abort (with core dump, if enabled) 2: normal...
2003 Feb 25
1
How to modify XML documents and save changes
...ome 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
2010 Aug 30
4
getNodeSet - what am I doing wrong?
Hi, Why is the following retuning a nodset of length 0: > library(XML) > test <- xmlTreeParse( > "http://www.unimod.org/xml/unimod_tables.xml",useInternalNodes=TRUE) > getNodeSet(test,"//modifications_row") Thanks for any hint. Joh
2010 Jun 22
1
Adding style sheet line to xml output
I'm probably being dense but I can't work out how to add the second line: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="style.xsl"?> <catalogue> ... ... I can get the first line using: saveXML(xml$value(), prefix='<?xml version="1.0"?>', encoding="ISO-8859-1") Any ideas? Thanks.
2008 Jul 02
1
Removing or overwriting an XML node
...ame> </Duncan> created by e.g. ? library(XML) tr <- xmlTree("Duncan") tr$addTag("name", attrs=c(a=1,b="xyz"), close=F) tr$addTag("first", "Duncan") tr$addTag("last", "Temple Lang") tr$closeTag() cat(saveXML(tr)) And now imagine I want to change <first>Duncan</first> into e.g.? <initials>D.</initials>. How to do that ? I am able to add my node: library(XML) x <- xmlTreeParse("duncan.xml", useInternalNodes = TRUE) # find parent, add as last child: nam...
2009 Jul 14
1
(simple) xml into data.frame and reverse
...onverts data.frame into XML xml <- xmlTree() xml$addTag("populationsize", close=FALSE) for (i in 1:nrow(data)) { xml$addTag("size", close=FALSE) for (j in names(data)) { xml$addTag(j, data[i, j]) } xml$closeTag() } xml$closeTag() # view the result cat(saveXML(xml)) I put below also an example of how my data looks like. Thanks for any advice! Best and have a great day, Stefan APPENDIX XML-file ------------------ <populationsize> ?<size> ? ?<age>0</age> ? ?<sex>0</sex> ? ?<number>500</number> ?</si...
2009 Jun 25
3
exportation of xml file from R
Hello everybody, I have programed a function to translate the R object structure into a XML data structure but I haven't found a function in the XML package to export this data in an XML file! my data look like that: <Factor>Assessor:codec</Factor> <Sum Sq> 33.98159</Sum Sq> <Df> 28</Df> <F value> 6.510894</F value>
2007 Dec 14
6
Analyzing Publications from Pubmed via XML
I would like to track in which journals articles about a particular disease are being published. Creating a pubmed search is trivial. The search provides data but obviously not as an R dataframe. I can get the search to export the data as an xml feed and the xml package seems to be able to read it. xmlTreeParse("
2010 Jun 22
0
Stylesheet line in xml output
...bably being dense but I can't work out how to add the second line: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="style.xsl"?> <catalogue> ... ... </catalogue> I can get the first line using: saveXML(xml$value(), prefix='<?xml version="1.0"?>', encoding="ISO-8859-1") Any ideas? Thanks.
2017 Nov 15
0
How to read PMML data from a text file and convert it to a model ?
...tation of the model. I am not able to read this representation convert it into a model. How can I do that ? Here is a MWE : library(pmml) mydata<- iris # Creating a model mymodel <- lm(Sepal.Length ~ Sepal.Width, data = mydata) #Computing its pmml representation and storing it to a file saveXML(pmml(mymodel),file = "myfile.xml") testingReading <- fileToXMLNode("myfile.txt") > testingReading <PMML version="4.3" xmlns="http://www.dmg.org/PMML-4_3"> <Header> <Application name="JPMML-R" version="1.2.20"/>...
2009 Aug 06
2
robots.txt
Hi all, I have again noticed that the wiki does not really show up in search results and wonder if it has any impact that robots.txt on wiki.centos.org is empty. Perhaps it should at least contain User-agent: * ? Best Regards Marcus
2008 May 02
1
How to parse XML
I would like to learn how to parse a mixed text/xml document I downloaded from the sec.gov website (see example below). I would like to parse this to get the value for each xml tag and then access it within R, but I don't know much about xml so I don't even know where to start debugging the errors I am getting in this example code. Can anyone help me get started? Thanks, Roger ftp
2011 Mar 29
2
Scrap java scripts and styles from an html document
Hi, I am working on developing a web crawler in R and I needed some help with regard to removal of javascripts and style sheets from the html document of a web page. i tried using the xml package, hence the function xpathApply library(XML) txt = xpathApply(html,"//body//text()[not(ancestor::script)][not(ancestor::style)]", xmlValue) The output comes out as text lines, without any html
2007 Jun 12
4
pretty report
Dear Listers: I have a couple of data frames to report and each corresponds to different condtions, e.g. conditions=c(10, 15, 20, 25). In this examples, four data frames need to be exported in a "pretty" report. I knew Perl has some module for exporting data to Excel and after googling, I found R does not. So I am wondering if there is a package in R for generating good reports. I
2012 May 20
3
dot - comma problem
Dear all I am trying to use the ODB package to connect to an libreoffice-odb database. The libreoffice package is german, thus, decimal separator is a comma. However, I can open the database and upload a it without error, library(ODB) db <- odb.open("Test.odb") but a soon as the "odb.open" command is executed, the decimal separator in R is changed to comma. Before
2008 Oct 15
0
R-help Digest, Vol 67, Issue 31
...as.is=TRUE) library(XML) xml <- xmlTree() xml$addTag("document", close=FALSE) for (i in 1:nrow(data)) { xml$addTag("row", close=FALSE) for (j in names(data)) { xml$addTag(j, data[i, j]) } xml$closeTag() } xml$closeTag() # view the result cat(saveXML(xml)) Paul zubin wrote: > Duncan, thanks for the note - the schema looks like this - is this what > your asking for? > > <document> > <row> > <date>2007-02-01</date > > <UYG_Open>71.32</UYG_Open > > <UYG_High>71.34</U...