Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Users might experience few discrepancies in Search results. We are working on this on our side. We apologize for the inconvenience it may have caused.
New Member

need help with Holiday script

Hi All,

 

I am not sure why my Holiday scripts keep returning Null, I have attached the script and xml files.

 

If someone can help would be great.

 

Thanks,

 

Hamed

1 ACCEPTED SOLUTION

Accepted Solutions

So if you read through the

So if you read through the logic of the script, it looks for Hokiday1 in the XML file theN Holiday2 then Holiday3, etc. As soon as it find one that doesn't exist is when the loop ends. If it doesn't find any, it returns null. Since your XML file starts with Holiday2, it returns null when looking for Holiday1 and then exits the script. I would try changing your XML file to begin with Holiday1 and aee what the debugging looks like after that.
4 REPLIES

One thing that is weird is

One thing that is weird is your XML file starts with Holiday2 instead of Holiday1.  Have you tried debugging the script?

New Member

Hi Brian.Thank you for your

Hi Brian.

Thank you for your reply. I do not think it matters, when I debugged the script it returns Null for "Date" in Get XML file.

I can see it goes to the XML and pulls out the information, but I am not sure why it returns Null.

 

Thanks,

 

Hamed

 

So if you read through the

So if you read through the logic of the script, it looks for Hokiday1 in the XML file theN Holiday2 then Holiday3, etc. As soon as it find one that doesn't exist is when the loop ends. If it doesn't find any, it returns null. Since your XML file starts with Holiday2, it returns null when looking for Holiday1 and then exits the script. I would try changing your XML file to begin with Holiday1 and aee what the debugging looks like after that.
New Member

My big five star to you mate

My big five star to you mate,

It works now!!!!

Hamed

 

55
Views
0
Helpful
4
Replies
CreatePlease to create content