The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

XPath Strings

Occasional Advisor

XPath Strings

For your enjoyment, here are some XPath expressions i've been using in Java. 



String findCampaignsExprStr = "//Campaign";
String nextPageExprStr = "//feed/link[@rel='next']";
String bounceExprString = "//BounceEvent";
String clickEventStr = "//ClickEvent";


String campaignStatusExprStr = String.format("//Campaign[@id='%s']/Status",campaignId);

String campaignDateExprStr = String.format("//Campaign[@id='%s']/Date",campaignId);


String bounceEventEmailExprStr = String.format("//BounceEvent[@id='%s']/Contact/EmailAddress",bounceId);
String bounceEventEventTimeExprStr = String.format("//BounceEvent[@id='%s']/EventTime",bounceId);
String bounceEventCodeExprStr = String.format("//BounceEvent[@id='%s']/Code",bounceId);


String clickEventContactEmailExprStr = String.format("//ClickEvent[@id='%s']/Contact/EmailAddress",clickId);
String clickEventTimeExprStr = String.format("//ClickEvent[@id='%s']/EventTime",clickId);
String clickEventCampaignExprStr = String.format("//ClickEvent[@id='%s']/Campaign",clickId);


String clickableUrlExprStr = "//Urls/Url";
String urlValueExprStr = String.format("//Url[@id='%s']/Value",urlId);




Re: XPath Strings

Thank you!  I am currently testing to see if I can reproduce the bounce time issue.  I will reply back to that thread with what I find!


Best Regards,

Shannon W.

API Support Specialist

Occasional Advisor

Re: XPath Strings

Thanks, the bounce date is the last thing keeping me from finishing up my current build, so any help is appreciated.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More