Skip to content Skip to sidebar Skip to footer

Prevent Adding First Line When Using Htmlparse() From 'xml' Package

I have a problem while doing a htmlParse() on a XHTML document. When it loads into R as an 'externalptr', I can see that one line is added, at the top of the file:

Solution 1:

I tried with xmlRoot() and then saved with saveXML(), including as parameters the prefix <?xml version="1.0" encoding="utf-8" ?>

There was also an encoding problem but that's another story. In Windows didn't work, in Ubuntu finally worked.

Thank you all.

Post a Comment for "Prevent Adding First Line When Using Htmlparse() From 'xml' Package"