[cisco-voip] IPCC Script: Get XML Document Data (traversal)

Joanne Thompson JoanneThompson at abbottsystemsinc.com
Mon Jul 16 11:20:29 EDT 2007


Thanks for the response. I have already changed my xml to have this type
of format and it works.

For my own knowledge, I would be interested in knowing how to traverse
the original xml,
getting each <Holiday> node within the <Holidays>.  For example, within
an ipcc script, get the first 
<Holiday> node, processing it, and then getting the next <Holiday> node,
etc.  I'm not sure what the
Syntax would be to get the sibling nodes.

-----Original Message-----
From: Jonathan Charles [mailto:jonvoip at gmail.com] 
Sent: Monday, July 16, 2007 10:14 AM
To: Joanne Thompson
Cc: cisco-voip at puck.nether.net
Subject: Re: [cisco-voip] IPCC Script: Get XML Document Data (traversal)

This really depends a LOT on what data your script is looking for...

For example, see the attached XML... this is one that we just populate
dates with and do a simple true false (get date, does date match one
of these? If yes, then it is a holiday).

This may be a simpler way of doing what you want to accomplish...


Jonathan


On 7/11/07, Joanne Thompson <JoanneThompson at abbottsystemsinc.com> wrote:
>
>
>
>
> I've set up an xml file with the below format and I am trying to
figure out
> how to
>
> Traverse it so I can process each date.   I'm not sure what the syntax
is.
> I can get the first one with no
>
> Problem.  Any help is much appreciated.
>
>
>
> <?xml version="1.0" encoding="utf-8" ?>
>
> <!--
>
>      Holiday.xml
>
>      -->
>
> <Holidays>
>
>   <Holiday>
>
>     <Name>New Year</Name>
>
>     <Date>01/01/2007</Date>
>
>   </Holiday>
>
>   <Holiday>
>
>     <Name>Memorial Day</Name>
>
>     <Date>05/31/2007</Date>
>
>   </Holiday>
>
>   <Holiday>
>
>     <Name>Fourth of July</Name>
>
>     <Date>07/04/2007</Date>
>
>   </Holiday>
>
>   <Holiday>
>
>     <Name>Labor Day</Name>
>
>     <Date>09/03/2007</Date>
>
>   </Holiday>
>
>   <Holiday>
>
>     <Name>Thanksgiving</Name>
>
>     <Date>11/22/2007</Date>
>
>   </Holiday>
>
>   <Holiday>
>
>     <Name>Thanksgiving Observance</Name>
>
>     <Date>11/23/2007</Date>
>
>   </Holiday>
>
>   <Holiday>
>
>     <Name>Christmas</Name>
>
>     <Date>12/31/2007</Date>
>
>   </Holiday>
>
> </Holidays>
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>

DISCLAIMER: The information contained in this electronic communication and any accompanying document is confidential, may be protected under law, and is intended only for the use of the addressee. It is the property of Abbott Systems Inc., and may be considered trade secret or protected under non-disclosure or intellectual property agreements. Unauthorized use, disclosure or copying of this communication, or any part of it, is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately by return email, and destroy this communication and all copies of it, including all attachments. Electronic communication may be susceptible to data corruption, interception and unauthorized tampering and Abbott Systems Inc. disclaims all liability of any kind for such actions or any consequences that may arise directly or indirectly from such instances. 


More information about the cisco-voip mailing list