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

201
Views
5
Helpful
2
Replies
Highlighted

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
VIP Advisor

Re: UCCX READ DATA FROM XML

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

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
2 REPLIES 2
VIP Advisor

Re: UCCX READ DATA FROM XML

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

Anthony Holloway

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

Re: UCCX READ DATA FROM XML

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?

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards