cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

845
Views
3
Helpful
1
Replies
achulbert
Beginner

Get XML Document Data step always returns NULL

Hi All,

I was hoping someone might be able to help with this.

I'm writing a holiday script, it uses XML to check whether the date is a holiday or halfday. XML below

<?xml version="1.0" encoding="ISO-8859-1"?>

<Holidays>

  <Holiday Date="1/1/2012">Holiday</Holiday>

  <Holiday Date="3/1/2012">Halfday</Holiday>

  <Holiday Date="6/1/2012">Holiday</Holiday>

  <Holiday Date="5/4/2012">Halfday</Holiday>

  <Holiday Date="6/4/2012">Holiday</Holiday>

  <Holiday Date="8/4/2012">Holiday</Holiday>

  <Holiday Date="9/4/2012">Holiday</Holiday>

  <Holiday Date="30/4/2012">Halfday</Holiday>

  <Holiday Date="1/5/2012">Holiday</Holiday>

  <Holiday Date="17/5/2012">Holiday</Holiday>

  <Holiday Date="27/5/2012">Holiday</Holiday>

  <Holiday Date="6/6/2012">Holiday</Holiday>

  <Holiday Date="23/6/2012">Holiday</Holiday>

  <Holiday Date="6/4/2012">Holiday</Holiday>

  <Holiday Date="3/11/2012">Halfday</Holiday>

  <Holiday Date="25/12/2012">Holiday</Holiday>

  <Holiday Date="26/12/2012">Holiday</Holiday>

  <Holiday Date="19/10/2012">Halfday</Holiday>

</Holidays>

However when I debug the script the result of the Get XML Document step always returns null.

Xpath work great in notepad++

My code is attached, anyone with any pointers?

Regards,

Andy

1 REPLY 1
Anthony Holloway
Cisco Employee

Your XPATH of:

"/Holidays/Holiday[@Date='+DateString+']"

Needs to be:

"/Holidays/Holiday[@Date='"+DateString+"']"

Good luck and happy scripting!

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Content for Community-Ad