Given the following (quasi)xml-structure of EPO's patent Server REPO:
<ep-patent-document id="EP79301547B1" file="EP79301547NWB1.xml" lang="en" country="EP" doc-number="0007815" kind="B1" date-publ="19871021" status="n" dtd-version="ep-patent-document-v1-1">
<SDOBI lang="en">
<B000>...</B000>
<B100>...</B100>
<B200>
<B210>79301547.0</B210>
<B220>
<date>19790801</date>
</B220>
<B240/>
<B250>en</B250>
<B251EP>en</B251EP>
<B260>en</B260>
</B200>
<B300>...</B300>
<B400>...</B400>
<B500>...</B500>
<B700>...</B700>
<B800>...</B800>
</SDOBI>
<!-- EPO <DP n="1"> -->
<!-- EPO <DP n="2"> -->
<description id="desc" lang="en">...</description>
<claims id="claims01" lang="en">...</claims>
<claims id="claims02" lang="de">...</claims>
<claims id="claims03" lang="fr">...</claims>
</ep-patent-document>
I would like to select the number in node "B210" and the text in "description".
Using
library(httr)
library(rvest)
library(XML)
library(magrittr)
files1993 <- list.files("~/Downloads", full.names=TRUE, recursive=TRUE)
y <- files1993[1]
parse1993 <- htmlParse(y)
parse1993 %>% xml_nodes("description")
parse1993 %>% xml_nodes("SDOBI") %>% xml_nodes("B210")
I do get the description text but nothing for B210. In fact, the command won't work for any information given in . Do I have to convert the information given in SDOBI into text? I am a little lost here. Any help highly appreciated.