[R] Adding style sheet line to xml output

Nick nick.straw at gmail.com
Wed Jun 23 09:30:57 CEST 2010


Just to clarify - I am using the XML library and the xml which is an
xmlTree has the xml in it. I just need to save it to a file so that I
can view, print etc.

Thanks.


On Jun 22, 2:45 pm, Nick <nick.st... at gmail.com> wrote:
> 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.
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list