Getting my historical teacher record at University with R, XML, JSON

# My historical teacher record

library(XML)
library(jsonlite)
> sgaws <- GET('http://ws.unl.edu.ec/sgaws/wsacademica/sgaws_carga_horaria_docente?cedula=XXXXXXXXX&amp;id_oferta=45', authenticate('xxxxxxx','xxxxxxx'))
&gt; sgaws
Response [http://ws.unl.edu.ec/sgaws/wsacademica/sgaws_carga_horaria_docente?cedula=1103499966&amp;id_oferta=45]
  Date: 2014-10-17 10:22
  Status: 200
  Content-type: text/xml; charset=utf-8
  Size: 549 B
> xmlsga &lt;- xmlTreeParse(sgaws)
> xmlRoot(xmlsga)
> doc <- xmlRoot(xmlsga)
> xmlSApply(doc[[1]],xmlValue)
list()
> l <- xmlSApply(doc[[1]],xmlValue)
> print(l)
[&amp;quot;INGENIERO EN INFORMATICA&amp;quot;, &amp;quot;MILTON LEONARDO&amp;quot;, &amp;quot;LABANDA JARAMILLO&amp;quot;, [[&amp;quot;Ingenier\u00eda en Sistemas&amp;quot;, &amp;quot;PROCESO INVESTIGATIVO&amp;quot;, &amp;quot;0.00&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;B&amp;quot;], [&amp;quot;Ingenier\u00eda en Sistemas&amp;quot;, &amp;quot;PROCESO INVESTIGATIVO&amp;quot;, &amp;quot;0.00&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;A&amp;quot;], [&amp;quot;Ingenier\u00eda en Sistemas&amp;quot;, &amp;quot;PROCESO INVESTIGATIVO&amp;quot;, &amp;quot;0.00&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;C&amp;quot;], [&amp;quot;Ingenier\u00eda en Sistemas&amp;quot;, &amp;quot;PROGRAMACION AVANZADA&amp;quot;, &amp;quot;128.00&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;C&amp;quot;], [&amp;quot;Ingenier\u00eda en Sistemas&amp;quot;, &amp;quot;PROGRAMACION AVANZADA&amp;quot;, &amp;quot;128.00&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;A&amp;quot;], [&amp;quot;Ingenier\u00eda en Sistemas&amp;quot;, &amp;quot;PROGRAMACION AVANZADA&amp;quot;, &amp;quot;128.00&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;B&amp;quot;]]]
> xmlValue(l)
[1] &quot;[\&quot;INGENIERO EN INFORMATICA\&quot;, \&quot;MILTON LEONARDO\&quot;, \&quot;LABANDA JARAMILLO\&quot;, [[\&quot;Ingenier\\u00eda en Sistemas\&quot;, \&quot;PROCESO INVESTIGATIVO\&quot;, \&quot;0.00\&quot;, \&quot;5\&quot;, \&quot;B\&quot;], [\&quot;Ingenier\\u00eda en Sistemas\&quot;, \&quot;PROCESO INVESTIGATIVO\&quot;, \&quot;0.00\&quot;, \&quot;5\&quot;, \&quot;A\&quot;], [\&quot;Ingenier\\u00eda en Sistemas\&quot;, \&quot;PROCESO INVESTIGATIVO\&quot;, \&quot;0.00\&quot;, \&quot;5\&quot;, \&quot;C\&quot;], [\&quot;Ingenier\\u00eda en Sistemas\&quot;, \&quot;PROGRAMACION AVANZADA\&quot;, \&quot;128.00\&quot;, \&quot;5\&quot;, \&quot;C\&quot;], [\&quot;Ingenier\\u00eda en Sistemas\&quot;, \&quot;PROGRAMACION AVANZADA\&quot;, \&quot;128.00\&quot;, \&quot;5\&quot;, \&quot;A\&quot;], [\&quot;Ingenier\\u00eda en Sistemas\&quot;, \&quot;PROGRAMACION AVANZADA\&quot;, \&quot;128.00\&quot;, \&quot;5\&quot;, \&quot;B\&quot;]]]&quot;
> resultStr <- xmlValue(l)
> data <- jsonlite::fromJSON(resultStr)
> data
[[1]]
[1] &quot;INGENIERO EN INFORMATICA&quot;

[[2]]
[1] &quot;MILTON LEONARDO&quot;

[[3]]
[1] &quot;LABANDA JARAMILLO&quot;

[[4]]
     [,1]                     [,2]                    [,3]     [,4] [,5]
[1,] &quot;Ingeniería en Sistemas&quot; &quot;PROCESO INVESTIGATIVO&quot; &quot;0.00&quot;   &quot;5&quot;  &quot;B&quot; 
[2,] &quot;Ingeniería en Sistemas&quot; &quot;PROCESO INVESTIGATIVO&quot; &quot;0.00&quot;   &quot;5&quot;  &quot;A&quot; 
[3,] &quot;Ingeniería en Sistemas&quot; &quot;PROCESO INVESTIGATIVO&quot; &quot;0.00&quot;   &quot;5&quot;  &quot;C&quot; 
[4,] &quot;Ingeniería en Sistemas&quot; &quot;PROGRAMACION AVANZADA&quot; &quot;128.00&quot; &quot;5&quot;  &quot;C&quot; 
[5,] &quot;Ingeniería en Sistemas&quot; &quot;PROGRAMACION AVANZADA&quot; &quot;128.00&quot; &quot;5&quot;  &quot;A&quot; 
[6,] &quot;Ingeniería en Sistemas&quot; &quot;PROGRAMACION AVANZADA&quot; &quot;128.00&quot; &quot;5&quot;  &quot;B&quot; 

> data[1]
[[1]]
[1] &quot;INGENIERO EN INFORMATICA&quot;

> data[3]
[[1]]
[1] &quot;LABANDA JARAMILLO&quot;

> data[4]
[[1]]
     [,1]                     [,2]                    [,3]     [,4] [,5]
[1,] &quot;Ingeniería en Sistemas&quot; &quot;PROCESO INVESTIGATIVO&quot; &quot;0.00&quot;   &quot;5&quot;  &quot;B&quot; 
[2,] &quot;Ingeniería en Sistemas&quot; &quot;PROCESO INVESTIGATIVO&quot; &quot;0.00&quot;   &quot;5&quot;  &quot;A&quot; 
[3,] &quot;Ingeniería en Sistemas&quot; &quot;PROCESO INVESTIGATIVO&quot; &quot;0.00&quot;   &quot;5&quot;  &quot;C&quot; 
[4,] &quot;Ingeniería en Sistemas&quot; &quot;PROGRAMACION AVANZADA&quot; &quot;128.00&quot; &quot;5&quot;  &quot;C&quot; 
[5,] &quot;Ingeniería en Sistemas&quot; &quot;PROGRAMACION AVANZADA&quot; &quot;128.00&quot; &quot;5&quot;  &quot;A&quot; 
[6,] &quot;Ingeniería en Sistemas&quot; &quot;PROGRAMACION AVANZADA&quot; &quot;128.00&quot; &quot;5&quot;  &quot;B&quot; 
 

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s