How to read xml in UTF-8 format. I have one XML file but i want to read it
in UTF-8 format. How this is possible?
<barplot>
<cd>
<name>?</name>
<value1>3</value1>
<value2>2.9</value2>
</cd>
<cd>
<name>?</name>
<value1>3.3</value1>
<value2>3</value2>
</cd>
<cd>
<name>??</name>
<value1>2.3</value1>
<value2>2.9</value2>
</cd>
<cd>
<name>?</name>
<value1>3.4</value1>
<value2>2.6</value2>
</cd>
<cd>
<name>??</name>
<value1>3.1</value1>
<value2>2.4</value2>
</cd>
</barplot>
Regards
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-read-XML-in-UTF-8-format-tp4646232.html
Sent from the R help mailing list archive at Nabble.com.
On 15.10.2012 14:49 (UTC+2), Manish Gupta wrote:> How to read xml in UTF-8 format. I have one XML file but i want to read it > in UTF-8 format. How this is possible? > > <barplot> > <cd> > <name>?</name> > <value1>3</value1> > <value2>2.9</value2> > </cd> > <cd> > <name>?</name> > <value1>3.3</value1> > <value2>3</value2> > </cd> > <cd> > <name>??</name> > <value1>2.3</value1> > <value2>2.9</value2> > </cd> > <cd> > <name>?</name> > <value1>3.4</value1> > <value2>2.6</value2> > </cd> > <cd> > <name>??</name> > <value1>3.1</value1> > <value2>2.4</value2> > </cd> > </barplot> > > RegardsGiven, that the above lines are stored in an UTF-8 encoded file named 'xml-unicode', the following works for me: library(XML) xmlParseDoc("xml-unicode", encoding="UTF-8") I think, there a smarter solutions. Hope this helps, Rainer> View this message in context: http://r.789695.n4.nabble.com/How-to-read-XML-in-UTF-8-format-tp4646232.html > Sent from the R help mailing list archive at Nabble.com.
Reasonably Related Threads
- transform.data.frame() ignores unnamed arguments when no named argument is provided
- Accesing data frame members from within functions
- How to arrange the data
- cbind in aggregate formula - based on an existing object (vector)
- Creating data frame with residuals of a data frame