×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

create XML Look up table

create XML Look up table

create XML Look up table

(OP)
Hello,
I need assistance with the syntax to create a xml look up table. What I am trying to do is to have the text to speech playback the full state name instead of the state abbreviation that it recieves from the Db, for example "california" instead of "ca". We have a dates.xml file that does a look up to determine if the date is a holiday. The segment of the script for the holiday look up is:
/*Check for Holiday*/
todayIsAHoliday = Call Subflow (SCRIPT [holidayDoc.aef],todayIsAHoliday)
If (todayIsAHoliday)Then
True
Goto AFTER HOURS.

The todayis a holiday subflow uses the dates.xml file

<!-- NO LEADING ZEROES IN DATE NUMBERS !!!! -->
<Holidays>
       <Holiday1>5/25/2009</Holiday1>
       <Holiday2>7/3/2009</Holiday2>
       <Holiday3>9/7/2009</Holiday3>      
       <Holiday4>11/26/2009</Holiday4>       
       <Holiday5>12/25/2009</Holiday5>
       <Holiday6>1/1/2010</Holiday6>
       <Holiday7></Holiday7>
       <Holiday8></Holiday8>
</Holidays>

What I had thought that I could do is something like this:
<State1>CA</California>. What I am wondering is - is it case sensitive? For example if it recieves ca, cA or Ca instead of CA will this still return "california"?

I am a newbie at this so any help that you could provide woud be greatly appreciated. :)

Thank you,

Lilabell
 

RE: create XML Look up table

For starters your XML is wrong.  XML uses tags.  These tags must be matched.  So your Holiday Example...
<Holidays>
  <Holiday1>1/1/1999<Holiday1>
</Holidays>

Not the balance with the beginning tag and ending </ tag.

Second, the example you give is essentially returning a match, if today is a Holiday.  You are looking to transpose the match into a value.  You probably want something like:
<States>
  <AL>Alabama</AL>
  <CA>California</CA>
</States>

You can then grab the Node for the Abbr you have and get the value.

Hope this helps.
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close