After converting an XMLDocument type object to Character using this:
do.call(paste, as.list(capture.output(list_links)))
I want to use strsplit to extract particular strings from the resulting character object. The output of list_links is given below.
[1] "[[1]] <a href=\"/Archive/CrossNational.asp\">Cross-National Data</a> [[2]] <a href=\"/Archive/MultiNation.asp\">Multiple Nation Surveys</a> [[3]] <a href=\"/Archive/IntSurveys.asp\">Single Nation Surveys</a> [[4]] <a href=\"/Archive/ChCounty.asp\">County-Level Data</a> [[5]] <a href=\"/Archive/ChState.asp\">State-Level Data</a> [[6]] <a href=\"/Archive/NatBaylor.asp\">Baylor Religion Surveys</a> [[7]] <a href=\"/Archive/GSS.asp\">General Social Surveys</a> [[8]] <a href=\"/Archive/Polls.asp\">News Polls</a> [[9]] <a href=\"/Archive/NES.asp\">National Election Studies</a> [[10]] <a href=\"/Archive/NatFamily.asp\">National Survey of Family Growth</a> [[11]] <a href=\"/Archive/NSYR.asp\">National Studies of Youth and Religion (NSYR)</a> [[12]] <a href=\"/Archive/PewResearch.asp\">Pew Research Center</a> [[13]] <a href=\"/Archive/PALS.asp\">Portraits of American Life Study (PALS)</a> [[14]] <a href=\"/Archive/PRRI.asp\">Public Religion Research Institute (PRRI)</a> [[15]] <a href=\"/Archive/NatOther.asp\">Other National Surveys</a> [[16]] <a href=\"/Archive/State1stAmnd.asp\">State of the First Amendment Surveys</a> [[17]] <a href=\"/Archive/Middletown.asp\">Middletown Data</a> [[18]] <a href=\"/Archive/Sfocus.asp\">Southern Focus Polls</a> [[19]] <a href=\"/Archive/RegOther.asp\">Other Local/Regional Surveys</a> [[20]] <a href=\"/Archive/FCT.asp\">Faith Communities Today</a> [[21]] <a href=\"/Archive/NCS.asp\">National Congregations Study</a> [[22]] <a href=\"/Archive/USCLS.asp\">U.S. Congregational Life Survey</a> [[23]] <a href=\"/Archive/CongOther.asp\">Other Surveys</a> [[24]] <a href=\"/Archive/Adventist.asp\">Adventist</a> [[25]] <a href=\"/Archive/Baptist.asp\">Baptist</a> [[26]] <a href=\"/Archive/Catholic.asp\">Catholic</a> [[27]] <a href=\"/Archive/Jewish.asp\">Jewish</a> [[28]] <a href=\"/Archive/Lutheran.asp\">Lutheran</a> [[29]] <a href=\"/Archive/Methodist.asp\">Methodist</a> [[30]] <a href=\"/Archive/Mormon.asp\">Mormon</a> [[31]] <a href=\"/Archive/Nazarene.asp\">Nazarene</a> [[32]] <a href=\"/Archive/Presbyterian.asp\">Presbyterian</a> [[33]] <a href=\"/Archive/Unitarian.asp\">Unitarian-Universalist</a> [[34]] <a href=\"/Archive/GrpOther.asp\">Other Groups</a> [[35]] <a href=\"/Archive/InstructData.asp\">Instructional Data Files</a> [[36]] <a href=\"/Archive/Other.asp\">Other Data</a> "
I want to extract a list of each url in the a tags. i.e the first object in my list after using strsplit should be "/Archive/CrossNational.asp"