cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
801
Views
5
Helpful
2
Replies

UCCX READ DATA FROM XML

I have this xml document and try to get the data from this xml document:

xml document:

 

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

<!-- NO LEADING ZEROES IN DATE NUMBERS !!!! -->

-<Holidays>


-<Holiday1>

<date>1/15/2018</date>

<todStart>1100 AM</todStart>

<todend>0300 PM</todend>

</Holiday1>

</Holidays>

 

script:

2019-03-11_18-52-36.jpg

how do i get the child information of todstart and todend.

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee
You shouldn't need anything on the end of it to make it work. Just ending the XPATH expression with the node name: todStart should be enough. Have you tried that?

I would also recommend you not use the descendant/child method either, simply do:

"//" + Holiday + "/date" for the date
"//" + Holiday + "/todStart" for the start time
"//" + Holiday + "/todend" for the end time

View solution in original post

2 Replies 2

Anthony Holloway
Cisco Employee
Cisco Employee
You shouldn't need anything on the end of it to make it work. Just ending the XPATH expression with the node name: todStart should be enough. Have you tried that?

I would also recommend you not use the descendant/child method either, simply do:

"//" + Holiday + "/date" for the date
"//" + Holiday + "/todStart" for the start time
"//" + Holiday + "/todend" for the end time

I now able to extract the value from the xml file. but I am now stuck at how to convert the string data extracted from document to time data type.

 

original value in the document 

<Holidays>
<Holiday1>
<date>1/15/2018</date>
<todStart>1100</todStart>
<todend>1500</todend>
</Holiday1>
<Holiday2>
<date>3/13/2019</date>
<todStart>1000</todStart>
<todend>1500</todend>
</Holiday2>
</Holidays>

 

variable data types and set strings:

2019-03-22_4-12-32.jpg

need to set sTime and eTime in the time formate.

 

also how do i verify that my server is running on 24 hours clock or 12 hours?