Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to convert XML file to Dataframe #1

Open
kg448 opened this issue Aug 28, 2017 · 1 comment
Open

Unable to convert XML file to Dataframe #1

kg448 opened this issue Aug 28, 2017 · 1 comment

Comments

@kg448
Copy link

kg448 commented Aug 28, 2017

Trying to convert the xml file returned from the pardot client function into a dataframe in R.

Code:
devtools::install_github("sillson/paRdot",dependencies=T)
library(XML)
library(xml2)
library(gdata)
library(paRdot)
set_credentials(*******, ,)
df1<-pardot_client(object='Prospect',operator='query',identifier_field = '')
df1
df2<-xmlToDataFrame(df1)
df3<-pardot_client(object='Email Clicks',operator='query',identifier_field = '')
df3

O/P

set_credentials(****, ,)
df1<-pardot_client(object='Prospect',operator='query',identifier_field = '')
df1
<list(stat = "ok", version = 1)/>
<list(prospect = list(id = , campaign_id =
, user_id = ******, salutation = *****, first_name = , last_name =, email = ***********, company = ********, website = NULL, job_title = ****, department = ****, country = ***, address_one = ***, address_two = ****, city = ****, state = ****, territory = ****, zip = ****, phone = ****, source = ****, annual_revenue = *, employees =, industry = ****, years_in_business = ****,
score = ****, grade = ***, crm_lead_fid = ****, crm_contact_fid = ***************, crm_owner_fid = *******, last_activity_at = ******, is_do_not_email = **** is_do_not_call = ****, opted_out = ****, is_reviewed = *, created_at = ******, updated_at = ********, campaign = list(id = ****, name = *******), prospect_account_id = *******), etc.)))/>
df2<-xmlToDataFrame(df1)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘xmlToDataFrame’ for signature ‘"XMLNode", "missing", "missing", "missing", "missing"’
df3<-pardot_client(object='Email Clicks',operator='query',identifier_field = '')
No encoding supplied: defaulting to UTF-8.
df3
<

400 Bad request

Your browser sent an invalid request. />

Desired Output:
Dataframe with the data in the XML. Also , there is a limit on the number of prospects I can extract from Pardot. So a workaround would help. Thanks!

@kanny789
Copy link

Did you find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants