Cleber N. Borges a écrit : > 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 > > > > The piece of the code is: > > ### code > ############################################################ > ... > > <<makeGraph, echo=T, results=xml>>= > fileplot='C:\\DADOS\\tmp\\plotx.emf' > win.metafile(fileplot) > plot( rnorm(300), col='red', t='l', lwd=2 ); grid() > dev.off() > @
???? This chunk is pure R code and shouldn't output anything directly in the output file. Since you are telling "echo=T', whatever is output by your code is sent to your output file, and since you assert "results=xml",this output is interpreted as xml ; since this isn't XML, your're getting guff from the XML interpreter. I'd rather do : <<makeGraph, echo=FALSE>>= invisible({ # Whatever you did ... }) @ instead. Your second chunk : > <<insertGraph, echo=T, results=xml>>= > odfInsertPlot(file=fileplot, height=5, width=5 ) > @ should insert your plot in the output file. [Snip ... ] BTW : Windows (enhanced) metafile are Windows-specific. As far as I can tell, recent versions of Office and OpenOffice.org correctly render Encapsulated Postcript files, thus freeing you from another Windows demendency. Unless you *have* to have an EMF output (it happens, I know ...), youd'better use use this format directly. HTH Emmanuel Charpentier ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.