Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create XML Look up table

Status
Not open for further replies.

lilabell

MIS
Apr 29, 2003
88
US
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top