You are viewing limited content. For full access, please sign in.

Question

Question

Help With Read XML Activity for Applitrack

asked on April 18, 2014 Show version history

I am accessing an API of some software we use to hire employees. I am now able to retrieve the XML from the API for a specific applicant, but I am having problems creating tokens using the Read XML activity. I am not all that familiar with XPath. Below is what I am receiving back from the HTTP Request. When I try to select just the <d:AppEmailAddress>your@emailaddress.com</d:AppEmail Address> using //d:AppEmailAddress it gives me the following message when testing it Error: Unable to read XML: ''d' is an undeclared prefix. Is there a way around this?

 

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<entry xml:base="https://www.applitrack.com/xxxx/api/AppliTrackAPI.svc/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
  <id>https://www.applitrack.com/xxxx/api/AppliTrackAPI.svc/Applications(18505)</id>
  <title type="text"></title>
  <updated>2014-04-18T17:17:46Z</updated>
  <author>
    <name />
  </author>
  <link rel="edit" title="Application" href="Applications(18505)" />
  <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Education" type="application/atom+xml;type=feed" title="Education" href="Applications(18505)/Education" />
  <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Experience" type="application/atom+xml;type=feed" title="Experience" href="Applications(18505)/Experience" />
  <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Employees" type="application/atom+xml;type=entry" title="Employees" href="Applications(18505)/Employees" />
  <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/FileBaseDocuments" type="application/atom+xml;type=feed" title="FileBaseDocuments" href="Applications(18505)/FileBaseDocuments" />
  <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/FormsSent" type="application/atom+xml;type=feed" title="FormsSent" href="Applications(18505)/FormsSent" />
  <category term="APIModel.Application" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
  <content type="application/xml">
    <m:properties>
      <d:AppNo m:type="Edm.Int32">18505</d:AppNo>
      <d:TrkStartDate m:type="Edm.DateTime">2014-04-15T08:59:00</d:TrkStartDate>
      <d:TrkEndDate m:type="Edm.DateTime">2014-04-15T08:59:00</d:TrkEndDate>
      <d:TrkLastAccess m:type="Edm.DateTime" m:null="true" />
      <d:Trk25DayWarning m:type="Edm.Boolean" m:null="true" />
      <d:TrkCycleWarning m:type="Edm.Boolean" m:null="true" />
      <d:TrkIsActive m:type="Edm.Int32" m:null="true" />
      <d:Passcode>4155925</d:Passcode>
      <d:StartedFrom>Transfer</d:StartedFrom>
      <d:AppEmailAddress>your@emailaddress.com</d:AppEmailAddress>
      <d:AppLastName>John</d:AppLastName>
      <d:AppFirstName>Bridges</d:AppFirstName>
      <d:AppMiddleInitial>R</d:AppMiddleInitial>
      <d:AppOtherLastName m:null="true" />
      <d:AppOtherFirstName m:null="true" />
      <d:AppOtherMiddleInitial m:null="true" />
      <d:AppPresentStreet>Social Studies Teacher</d:AppPresentStreet>
      <d:AppPresentAptNbr m:null="true" />
      <d:AppPresentCity m:null="true" />
      <d:AppPresentState m:null="true" />
      <d:AppPresentZip m:null="true" />
      <d:AppPresentCountry m:null="true" />
      <d:AppPresentUntilDate m:null="true" />
      <d:AppPresentAreaCde m:null="true" />
      <d:AppPresentPhn m:null="true" />
      <d:AppPermanentStreet>Idaho Falls High School</d:AppPermanentStreet>
      <d:AppPermanentAptNbr m:null="true" />
      <d:AppPermanentCity m:null="true" />
      <d:AppPermanentState m:null="true" />
      <d:AppPermanentZip m:null="true" />
      <d:AppPermanentCountry m:null="true" />
      <d:AppPermanentAreaCde>208</d:AppPermanentAreaCde>
      <d:AppPermanentPhn>xxx-xxxx</d:AppPermanentPhn>
      <d:AppHomeAreaCde>208</d:AppHomeAreaCde>
      <d:AppHomePhone>xxx-xxxx</d:AppHomePhone>
      <d:EduHighSchoolAttended m:null="true" />
      <d:EduHighSchoolGradDate m:null="true" />
      <d:EduHighSchoolGradStatus m:null="true" />
      <d:EduOtherEndorsements m:null="true" />
      <d:EduHighestDegree m:null="true" />
      <d:EduGradAreaOfStudy m:null="true" />
      <d:EduTotalHrs>25</d:EduTotalHrs>
      <d:EduOverallUnderGradGpa m:null="true" />
      <d:EduOverallUnderGradScale m:null="true" />
      <d:EduOverallGradGpa m:null="true" />
      <d:EduOverallGradScale m:null="true" />
      <d:EduMajorUnderGradGpa m:null="true" />
      <d:EduMajorUnderGradScale m:null="true" />
      <d:EduMajorGradGpa m:null="true" />
      <d:EdumajorGradScale m:null="true" />
      <d:LangFluentInOther m:null="true" />
      <d:LangWhatLanguage m:null="true" />
      <d:LangSkillOralLevel m:null="true" />
      <d:LangSkillWrittenLevel m:null="true" />
      <d:PasswordReminder m:null="true" />
      <d:TrkPassedRequiredDocsScreen m:null="true" />
      <d:ListCertification>Current</d:ListCertification>
      <d:ListPositionsDesired>&lt;ol&gt;&lt;li&gt;JobID: 1831 - Summer Hourly Social Studies Teache &amp;nbsp; &lt;font size=1&gt;(0 years exp.)&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;</d:ListPositionsDesired>
      <d:ListCertificationsHeld m:null="true" />
      <d:TrkIsDeleted m:type="Edm.Int32" m:null="true" />
      <d:TrkFirstSubmitted m:type="Edm.DateTime" m:null="true" />
      <d:HQTPreviouslyObtained m:null="true" />
      <d:HQTSchoolDistrict m:null="true" />
      <d:AppType m:null="true" />
      <d:HasFormerExperience m:null="true" />
      <d:EduHighSchoolCity m:null="true" />
      <d:EduHighSchoolState m:null="true" />
      <d:ConCurrentlyEmployedByDistrict m:null="true" />
      <d:ConWhichDistrict m:null="true" />
      <d:ConExcludeFrom m:null="true" />
      <d:AuthInt m:type="Edm.Boolean" m:null="true" />
      <d:EduHighestGradeCompleted m:null="true" />
      <d:PolarisTchrTicket m:null="true" />
      <d:PolarisTchrDateCompleted m:type="Edm.DateTime" m:null="true" />
      <d:PolarisTchrOverallScore m:null="true" />
      <d:AppTitle m:null="true" />
      <d:AppTitleOther m:null="true" />
      <d:EduHighestDegreeGPA m:null="true" />
      <d:EduHighestDegreeScale m:null="true" />
      <d:PolarisSupportTicket m:null="true" />
      <d:PolarisSupportDateCompleted m:type="Edm.DateTime" m:null="true" />
      <d:PolarisSupportOverallScore m:null="true" />
      <d:AppPermanentCounty m:null="true" />
      <d:AppPresentCounty m:null="true" />
      <d:HighlyQualifiedTertiary m:null="true" />
      <d:AppSuffix m:null="true" />
      <d:AppOtherSuffix m:null="true" />
      <d:PolarisAdminTicket m:null="true" />
      <d:PolarisAdminDateCompleted m:type="Edm.DateTime" m:null="true" />
      <d:PolarisAdminOverallScore m:null="true" />
      <d:LangId>eng</d:LangId>
      <d:LockedUntilDate m:type="Edm.DateTime" m:null="true" />
      <d:SubmissionAttempts m:type="Edm.Int32">0</d:SubmissionAttempts>
      <d:LinkedInPublicProfileURL m:null="true" />
      <d:PolarisTchrSETicket m:null="true" />
      <d:PolarisTchrSEDateCompleted m:type="Edm.DateTime" m:null="true" />
      <d:PolarisTchrSEOverallScore m:null="true" />
    </m:properties>
  </content>
</entry>

 

0 0

Answer

SELECTED ANSWER
replied on April 18, 2014

//*[name() = 'd:AppEmailAddress']  should do it. (The XML has namespaces defined, which the activity does not handle very well)

0 0
replied on April 18, 2014

That worked perfectly. Thank you for the help!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.